This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
char* foo(const char*) standard functions
- From: Marc Glisse <marc dot glisse at normalesup dot org>
- To: libstdc++ at gcc dot gnu dot org
- Date: Tue, 30 May 2006 13:55:48 +0200 (MEST)
- Subject: char* foo(const char*) standard functions
Hello,
while doing some tests for PR 1773 on solaris 8, I got 6 unexpected
failures. 4 of them are assertion failures at execution in
22_locale/time_put/put/wchar_t/, and I will try to investigate. Here I
want to mention the other 2:
21_strings/c_strings/char/2.cc
21_strings/c_strings/wchar_t/2.cc
These tests check for the possibility to use functions like memchr to
silently remove the "const" for some pointer types. This is possible in C,
but I believe the C++ standard introduced overloaded versions of these
functions precisely to introduce more const safety and prevent these 2
files from compiling.
So what is the status of these 2 tests? Is it a gnu extension in order to
have a better C compatibility? On solaris>=8, if __cplusplus has the right
value, the functions have the standard c++ prototypes and it seems hard to
correct them.
(I was surprised that abi_check did not fail, but I guess it simply does
nothing on this platform, although it takes quite some time to do it)
--
Marc Glisse