This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/12433] Finds wrong overload of std::operator<<


PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12433


igodard at pacbell dot net changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|Wrong error message         |Finds wrong overload of
                   |                            |std::operator<<


------- Additional Comments From igodard at pacbell dot net  2003-09-27 22:30 -------
Further info: the problem does not appear to be in the warning message, but in the overload resolution of std::operator<<. In particular, the compiler is finding std::operator<<(ostream&, bool), and coercing the function pointer to bool which results in the (correct) warning given the (incorrect) overload.

std::operator<< is templated to accept any pointer type and put out the text representation of the target address to the ostream. It seems to fail with function pointers though.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]