c++/8493: Outputing strlen() to ostream causes bogus compiler error
rutt@chezrutt.com
rutt@chezrutt.com
Thu Nov 7 13:16:00 GMT 2002
>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
More information about the Gcc-bugs
mailing list