gcc/libstdc++-v3/testsuite
Jonathan Wakely 3228289e1e PR libstdc++/90682 allow set_terminate(0) and set_unexpected(0)
Make these functions restore the default handlers when passed a null
pointer. This is consistent with std::pmr::set_default_resource(0), and
also matches the current behaviour of libc++.

In order to avoid duplicating the preprocessor condition from
eh_term_handler.cc more that into a new eh_term_handler.h header and
define a macro that can be used in both eh_term_handler.cc and
eh_terminate.cc.

	PR libstdc++/90682
	* libsupc++/eh_term_handler.cc: Include eh_term_handler.h to get
	definition of _GLIBCXX_DEFAULT_TERM_HANDLER.
	* libsupc++/eh_term_handler.h: New header defining
	_GLIBCXX_DEFAULT_TERM_HANDLER.
	* libsupc++/eh_terminate.cc: Include eh_term_handler.h.
	(set_terminate): Restore default handler when argument is null.
	(set_unexpected): Likewise.
	* testsuite/18_support/set_terminate.cc: New test.
	* testsuite/18_support/set_unexpected.cc: New test.

From-SVN: r271808
2019-05-31 11:35:11 +01:00
..
17_intro Fix failing tests for use of non-reserved names 2019-05-20 15:38:21 +01:00
18_support PR libstdc++/90682 allow set_terminate(0) and set_unexpected(0) 2019-05-31 11:35:11 +01:00
19_diagnostics Add test for std::hash<std::error_code> 2019-05-07 16:30:29 +01:00
20_util PR libstdc++/71579 assert that type traits are not misused with incomplete types 2019-05-31 11:35:03 +01:00
21_strings LWG2788 basic_string spurious use of a default constructible allocator 2019-05-30 20:48:48 +01:00
22_locale P0482R5 char8_t: Updates to existing standard library tests 2019-02-22 01:16:08 +00:00
23_containers Fix testsuite bugs 2019-05-23 22:41:08 +01:00
24_iterators
25_algorithms Remove Profile Mode, deprecated since GCC 7.1 2019-05-13 11:50:21 +01:00
26_numerics Fix random_device to work with COW strings again 2019-05-31 11:34:53 +01:00
27_io PR libstdc++/88881 fix filesystem::symlink_status for Windows 2019-05-29 23:00:53 +01:00
28_regex PR libstdc++/89023 fix test that fails when <omp.h> not available 2019-02-11 12:56:59 +00:00
29_atomics Change test to use const variables instead of macros 2019-03-11 13:46:09 +00:00
30_threads LWG 2921 remove packaged_task constructors taking allocators 2019-05-23 22:40:56 +01:00
abi
backward
config
data
decimal
experimental PR libstdc++/90634 reduce allocations in filesystem::path construction 2019-05-28 20:39:48 +01:00
ext Remove obsolete Solaris 10 support 2019-05-14 17:17:23 +00:00
lib PR libstdc++/90252 fix effective-target check for TBB 2019-05-21 14:50:41 +01:00
libstdc++-abi
libstdc++-dg
libstdc++-prettyprinters Add __gnu_test::NullablePointer utility to testsuite 2019-05-14 12:17:23 +01:00
libstdc++-xmethods
performance
special_functions PR libstdc++/86655 - std::assoc_legendre should not constrain 2019-03-06 13:38:32 +00:00
tr1 PR libstdc++/86655 - std::assoc_legendre should not constrain 2019-03-06 13:38:32 +00:00
tr2
util PR libstdc++/71579 assert that type traits are not misused with incomplete types 2019-05-31 11:35:03 +01:00
Makefile.am Remove Profile Mode, deprecated since GCC 7.1 2019-05-13 11:50:21 +01:00
Makefile.in Remove Profile Mode, deprecated since GCC 7.1 2019-05-13 11:50:21 +01:00