https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84442
Jonathan Wakely <redi at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2018-02-19 Ever confirmed|0 |1 --- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> --- OK then this should help: --- a/libstdc++-v3/testsuite/30_threads/thread/cons/terminate.cc +++ b/libstdc++-v3/testsuite/30_threads/thread/cons/terminate.cc @@ -25,10 +25,19 @@ #include <thread> #include <exception> #include <cstdlib> +#if !_GLIBCXX_USE_C99_STDLIB && defined _GLIBCXX_HAVE_UNISTD_H +# include <unistd.h> +#endif void handle_terminate() { +#if _GLIBCXX_USE_C99_STDLIB std::_Exit(0); +#elif defined _GLIBCXX_HAVE_UNISTD_H + _exit(0); +#else + std::exit(0); +#endif } void f() { throw 1; }