On 02/14/2013 02:16 PM, Paolo Carlini wrote:
... or the below, just in case an interesting system provides the *quick_exit functions but doesn't define _GLIBCXX_USE_C99.
It seems rather unlikely that the system would provide some C11 functions without the corresponding C99 ones. I'm just going to #if out the whole test if the relevant functions aren't available:
commit e203f2dcdf077fcf61b4d6b3f8e399c25cc44dfb Author: Jason Merrill <ja...@redhat.com> Date: Thu Feb 14 11:15:28 2013 -0500 * testsuite/18_support/quick_exit/quick_exit.cc: #if out the whole test if unsupported. diff --git a/libstdc++-v3/testsuite/18_support/quick_exit/quick_exit.cc b/libstdc++-v3/testsuite/18_support/quick_exit/quick_exit.cc index 8e55890..b91cbe2 100644 --- a/libstdc++-v3/testsuite/18_support/quick_exit/quick_exit.cc +++ b/libstdc++-v3/testsuite/18_support/quick_exit/quick_exit.cc @@ -21,6 +21,7 @@ // 18.5 - Start and termination +#if defined(_GLIBCXX_HAVE_AT_QUICK_EXIT) && defined(_GLIBCXX_HAVE_QUICK_EXIT) #include <cstdlib> void handler() @@ -35,9 +36,10 @@ void wrong_handler() int main() { -#if defined(_GLIBCXX_HAVE_AT_QUICK_EXIT) && defined(_GLIBCXX_HAVE_QUICK_EXIT) std::at_quick_exit (handler); std::atexit (wrong_handler); std::quick_exit (1); +} +#else +int main() {} #endif -}