This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
c++/8493: Outputing strlen() to ostream causes bogus compiler error
- From: rutt at chezrutt dot com
- To: gcc-gnats at gcc dot gnu dot org
- Cc: dagraz at radiance dot com
- Date: 7 Nov 2002 21:10:03 -0000
- Subject: c++/8493: Outputing strlen() to ostream causes bogus compiler error
- Reply-to: rutt at chezrutt dot com
>Number: 8493
>Category: c++
>Synopsis: Outputing strlen() to ostream causes bogus compiler error
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Nov 07 13:16:07 PST 2002
>Closed-Date:
>Last-Modified:
>Originator: rutt@chezrutt.com
>Release: 3.2
>Organization:
>Environment:
linux Reproduced with RH 8.0 released compiler
>Description:
Compile this file with g++-3.2 I get a long error message starting with:
x.cxx:6: ambiguous overload for `std::ostream& << anonymous>' operator
Replacing the call to strlen with a locally defined function returning size_t or casting the result of strlen causes the compilation to succeed.
>How-To-Repeat:
g++ x.cxx
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="x.cxx"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="x.cxx"
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8c3RkbGliLmg+CgptYWluKCkKewogIHN0ZDo6
Y291dCA8PCBzdGQ6OnN0cmxlbigiaGVsbG8iKSA8PCBzdGQ6OmVuZGw7Cn0K