char* foo(const char*) standard functions

Ryan Mansfield RMansfield@qnx.com
Tue May 30 20:42:00 GMT 2006


> Ok thanks, if this discussion is the reference on the subject, I will 
> consider getting these 2 additional unexpected failures on solaris 
> not-a-bug (or even a good thing), although I still find it arguable that 
> the testsuite considers it a bug.

I have the same two testsuite failures on *-nto-qnx6.3.0.

The last discussion ended when Joe Buck wrote: 

"Just include <cstring> and call strchr as if the correct prototypes were
provided.  For valid code, the right thing will happen.  The
only issue is that the compiler will not detect cases where you
use strchr to silently get a char* from a const char*.  So all you
really lose is an error check."

Wouldn't it be better to make the test cases valid and lose the error check
on platforms that still use the C version?

Regards,

Ryan Mansfield



More information about the Libstdc++ mailing list