for __cplusplus < 201103L bits/c++config.h does: # ifndef _GLIBCXX_USE_C99_STDLIB # define _GLIBCXX_USE_C99_STDLIB _GLIBCXX98_USE_C99_STDLIB # endif but acinclude.m4 never defines _GLIBCXX98_USE_C99_STDLIB so the C99 stdlib.h functions are no longer defined for C++98. PR 69350 says we shouldn't be defining those non-C++98 functions anyway, but removing them now was not intentional (and we probably don't want to remove them for -std=gnu++98 anyway). #include <cstdlib> int main() { &std::strtoll; } $ g++ -std=c++98 ll.cc ll.cc: In function ‘int main()’: ll.cc:5:4: error: ‘strtoll’ is not a member of ‘std’ &std::strtoll; ^~~ ll.cc:5:4: note: suggested alternative: In file included from /home/jwakely/gcc/6/include/c++/6.0.0/cstdlib:75:0, from ll.cc:1: /usr/include/stdlib.h:209:22: note: ‘strtoll’ extern long long int strtoll (const char *__restrict __nptr, ^~~~~~~
Author: redi Date: Thu Feb 4 23:47:21 2016 New Revision: 233161 URL: https://gcc.gnu.org/viewcvs?rev=233161&root=gcc&view=rev Log: Test for C99 stdlib.h functions with -std=c++98 PR libstdc++/69626 * acinclude.m4 (GLIBCXX_ENABLE_C99): Check C99 stdlib.h functions with -std=c++98 and define _GLIBCXX98_USE_C99_STDLIB. * config.h.in: Regenerate. * configure: Regenerate. * testsuite/21_strings/c_strings/char/69626.cc: New. Added: trunk/libstdc++-v3/testsuite/21_strings/c_strings/char/69626.cc Modified: trunk/libstdc++-v3/ChangeLog trunk/libstdc++-v3/acinclude.m4 trunk/libstdc++-v3/config.h.in trunk/libstdc++-v3/configure
Fixed.