This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
RE: char* foo(const char*) standard functions
- From: Ryan Mansfield <RMansfield at qnx dot com>
- To: 'Marc Glisse' <marc dot glisse at normalesup dot org>, Paolo Carlini <pcarlini at suse dot de>
- Cc: libstdc++ at gcc dot gnu dot org
- Date: Tue, 30 May 2006 16:41:51 -0400
- Subject: RE: char* foo(const char*) standard functions
> 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