[Bug libstdc++/84442] FAIL: 30_threads/thread/cons/terminate.cc (test for excess errors)
redi at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Feb 19 16:21:00 GMT 2018
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; }
More information about the Gcc-bugs
mailing list