public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/16057] Error message omits overload candidate
2004-06-18 11:37 [Bug c++/16057] New: Error message omits overload candidate igodard at pacbell dot net
@ 2004-06-18 11:37 ` igodard at pacbell dot net
2004-06-18 11:39 ` igodard at pacbell dot net
` (3 subsequent siblings)
4 siblings, 0 replies; 7+ messages in thread
From: igodard at pacbell dot net @ 2004-06-18 11:37 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From igodard at pacbell dot net 2004-06-18 11:37 -------
Created an attachment (id=6557)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=6557&action=view)
Compiler output (-v -save-temps)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16057
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/16057] New: Error message omits overload candidate
@ 2004-06-18 11:37 igodard at pacbell dot net
2004-06-18 11:37 ` [Bug c++/16057] " igodard at pacbell dot net
` (4 more replies)
0 siblings, 5 replies; 7+ messages in thread
From: igodard at pacbell dot net @ 2004-06-18 11:37 UTC (permalink / raw)
To: gcc-bugs
The error message does not list one of the possible overloads of operator<<,
namely the one at display.hh:407:
template<typename Ch, typename Tr, typename Al, typename T>
inline
Display<Ch, Tr, Al>&
operator<<(Display<Ch, Tr, Al>& d, T t) {
d.under << t;
d.Scan();
return d;
}
--
Summary: Error message omits overload candidate
Product: gcc
Version: 3.4.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: igodard at pacbell dot net
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16057
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/16057] Error message omits overload candidate
2004-06-18 11:37 [Bug c++/16057] New: Error message omits overload candidate igodard at pacbell dot net
2004-06-18 11:37 ` [Bug c++/16057] " igodard at pacbell dot net
@ 2004-06-18 11:39 ` igodard at pacbell dot net
2004-06-18 14:52 ` bangerth at dealii dot org
` (2 subsequent siblings)
4 siblings, 0 replies; 7+ messages in thread
From: igodard at pacbell dot net @ 2004-06-18 11:39 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From igodard at pacbell dot net 2004-06-18 11:39 -------
Created an attachment (id=6558)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=6558&action=view)
Source code (-save-temps)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16057
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/16057] Error message omits overload candidate
2004-06-18 11:37 [Bug c++/16057] New: Error message omits overload candidate igodard at pacbell dot net
2004-06-18 11:37 ` [Bug c++/16057] " igodard at pacbell dot net
2004-06-18 11:39 ` igodard at pacbell dot net
@ 2004-06-18 14:52 ` bangerth at dealii dot org
2004-12-20 0:27 ` pinskia at gcc dot gnu dot org
2005-06-20 3:01 ` pinskia at gcc dot gnu dot org
4 siblings, 0 replies; 7+ messages in thread
From: bangerth at dealii dot org @ 2004-06-18 14:52 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From bangerth at dealii dot org 2004-06-18 14:52 -------
Confirmed. Here is some code:
----------------
void endl (int);
void endl (double);
struct A {};
void operator << (A &, int);
template<typename U>
void operator << (A &, U);
int main() {
A* e;
*e << endl;
}
---------------------
Note that 'endl' is the set of overloads; this would be alright if we
could find a function that picks a single element from this set of
overloads by a suitable type for the second argument, but we don't
have such a function. Instead, we get this:
g/x> /home/bangerth/bin/gcc-3.4-pre/bin/c++ -w -c x.cc
x.cc: In function `int main()':
x.cc:13: error: no match for 'operator<<' in '*e << endl'
x.cc:6: note: candidates are: void operator<<(A&, int)
Indeed, only one of the overloads of operator<< is listed. Now, one
could argue that this isn't even a bug: the second, templated overload,
is unable to pick among the overload set, so it can't possibly be a
candidate anyway, but this is a rather narrow interpretation. I would
concede that it may make sense to list all operator<< overloads here.
W.
--
What |Removed |Added
----------------------------------------------------------------------------
Severity|normal |minor
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Last reconfirmed|0000-00-00 00:00:00 |2004-06-18 14:52:28
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16057
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/16057] Error message omits overload candidate
2004-06-18 11:37 [Bug c++/16057] New: Error message omits overload candidate igodard at pacbell dot net
` (2 preceding siblings ...)
2004-06-18 14:52 ` bangerth at dealii dot org
@ 2004-12-20 0:27 ` pinskia at gcc dot gnu dot org
2005-06-20 3:01 ` pinskia at gcc dot gnu dot org
4 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-12-20 0:27 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |diagnostic
Last reconfirmed|2004-09-20 00:55:26 |2004-12-20 00:27:05
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16057
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/16057] Error message omits overload candidate
2004-06-18 11:37 [Bug c++/16057] New: Error message omits overload candidate igodard at pacbell dot net
` (3 preceding siblings ...)
2004-12-20 0:27 ` pinskia at gcc dot gnu dot org
@ 2005-06-20 3:01 ` pinskia at gcc dot gnu dot org
4 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-06-20 3:01 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-06-20 03:01 -------
*** Bug 20576 has been marked as a duplicate of this bug. ***
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16057
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/16057] Error message omits overload candidate
[not found] <bug-16057-4@http.gcc.gnu.org/bugzilla/>
@ 2011-09-27 8:38 ` paolo.carlini at oracle dot com
0 siblings, 0 replies; 7+ messages in thread
From: paolo.carlini at oracle dot com @ 2011-09-27 8:38 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16057
Paolo Carlini <paolo.carlini at oracle dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
CC|gcc-bugs at gcc dot gnu.org |
Resolution| |FIXED
--- Comment #5 from Paolo Carlini <paolo.carlini at oracle dot com> 2011-09-27 08:31:02 UTC ---
Fixed in 4.6.0.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2011-09-27 8:31 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-06-18 11:37 [Bug c++/16057] New: Error message omits overload candidate igodard at pacbell dot net
2004-06-18 11:37 ` [Bug c++/16057] " igodard at pacbell dot net
2004-06-18 11:39 ` igodard at pacbell dot net
2004-06-18 14:52 ` bangerth at dealii dot org
2004-12-20 0:27 ` pinskia at gcc dot gnu dot org
2005-06-20 3:01 ` pinskia at gcc dot gnu dot org
[not found] <bug-16057-4@http.gcc.gnu.org/bugzilla/>
2011-09-27 8:38 ` paolo.carlini at oracle dot com
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).