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]

c++/8493: Outputing strlen() to ostream causes bogus compiler error


>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


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