[patch] libstdc++/69626 Test for C99 stdlib.h functions with -std=c++98

Jonathan Wakely jwakely@redhat.com
Thu Feb 4 23:49:00 GMT 2016

When r230324 split the GLIBCXX_ENABLE_C99 configure checks to test
everything twice, once with -std=gnu++98 and once with -std=gnu++11,
we failed to check the stdlib.h functions with gnu++98. As a result
_GLIBCXX98_USE_C99_STDLIB was never defined, and so various C99
functions disappeared from namespace std in c++98 mode.

This adds the missing checks back, so those functions are added to
namespace std again.

The new test only runs on *-*-linux-gnu because we can't run it
everywhere, as some targets don't support the functions in C++98 mode
and so correctly don't define _GLIBCXX98_USE_C99_STDLIB. Some other
targets such as freebsd and dragonfly override
_GLIBCXX98_USE_C99_STDLIB in os_defines.h so were unaffected anyway.

Tested powerpc64-linux, committed to trunk.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.txt
Type: text/x-patch
Size: 3217 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20160204/e77b9047/attachment.bin>

More information about the Libstdc++ mailing list