public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/22566] New: Incorrect overload resolution on mutable field.
@ 2005-07-20 9:53 suckfish at ihug dot co dot nz
2005-07-20 15:36 ` [Bug c++/22566] " pinskia at gcc dot gnu dot org
0 siblings, 1 reply; 2+ messages in thread
From: suckfish at ihug dot co dot nz @ 2005-07-20 9:53 UTC (permalink / raw)
To: gcc-bugs
The following program prints a hex address. I expected it to print "Hello, world"
nm | c++filt|grep operator shows that the operator<< used is:
std::basic_ostream<char, std::char_traits<char> >::operator<<(void const*)
I expected operator<<(char const*)
This is with Fedora's gcc-4.0.1-3.i386.rpm
The program:
#include <sstream>
#include <stdio.h>
struct cerror {
~cerror() { printf ("%s\n", s.str().c_str()); }
mutable std::ostringstream s;
};
int main()
{
cerror().s << "Hello, world\n";
return 0;
}
--
Summary: Incorrect overload resolution on mutable field.
Product: gcc
Version: 4.0.1
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: suckfish at ihug dot co dot nz
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: i386-redhat-linux
GCC host triplet: i386-redhat-linux
GCC target triplet: i386-redhat-linux
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22566
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug c++/22566] Incorrect overload resolution on mutable field.
2005-07-20 9:53 [Bug c++/22566] New: Incorrect overload resolution on mutable field suckfish at ihug dot co dot nz
@ 2005-07-20 15:36 ` pinskia at gcc dot gnu dot org
0 siblings, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-07-20 15:36 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-07-20 15:36 -------
*** This bug has been marked as a duplicate of 9925 ***
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |DUPLICATE
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22566
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-07-20 15:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-07-20 9:53 [Bug c++/22566] New: Incorrect overload resolution on mutable field suckfish at ihug dot co dot nz
2005-07-20 15:36 ` [Bug c++/22566] " pinskia at gcc dot gnu dot org
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).