gcc/libstdc++-v3/libsupc++
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
..
array_type_info.cc Update copyright years. 2019-01-01 13:31:55 +01:00
atexit_arm.cc Update copyright years. 2019-01-01 13:31:55 +01:00
atexit_thread.cc Update copyright years. 2019-01-01 13:31:55 +01:00
atomic_lockfree_defines.h P0482R5 char8_t: Standard library support 2019-02-19 02:54:42 +00:00
bad_alloc.cc Update copyright years. 2019-01-01 13:31:55 +01:00
bad_array_length.cc Update copyright years. 2019-01-01 13:31:55 +01:00
bad_array_new.cc Update copyright years. 2019-01-01 13:31:55 +01:00
bad_cast.cc Update copyright years. 2019-01-01 13:31:55 +01:00
bad_typeid.cc Update copyright years. 2019-01-01 13:31:55 +01:00
class_type_info.cc Update copyright years. 2019-01-01 13:31:55 +01:00
cxxabi_forced.h Update copyright years. 2019-01-01 13:31:55 +01:00
cxxabi_init_exception.h Update copyright years. 2019-01-01 13:31:55 +01:00
cxxabi.h Update copyright years. 2019-01-01 13:31:55 +01:00
del_op.cc Update copyright years. 2019-01-01 13:31:55 +01:00
del_opa.cc Update copyright years. 2019-01-01 13:31:55 +01:00
del_opant.cc Update copyright years. 2019-01-01 13:31:55 +01:00
del_opnt.cc Update copyright years. 2019-01-01 13:31:55 +01:00
del_ops.cc Update copyright years. 2019-01-01 13:31:55 +01:00
del_opsa.cc Update copyright years. 2019-01-01 13:31:55 +01:00
del_opv.cc Update copyright years. 2019-01-01 13:31:55 +01:00
del_opva.cc Update copyright years. 2019-01-01 13:31:55 +01:00
del_opvant.cc Update copyright years. 2019-01-01 13:31:55 +01:00
del_opvnt.cc Update copyright years. 2019-01-01 13:31:55 +01:00
del_opvs.cc Update copyright years. 2019-01-01 13:31:55 +01:00
del_opvsa.cc Update copyright years. 2019-01-01 13:31:55 +01:00
dyncast.cc Update copyright years. 2019-01-01 13:31:55 +01:00
eh_alloc.cc Fix after P0600. 2019-01-21 11:47:30 +00:00
eh_arm.cc Update copyright years. 2019-01-01 13:31:55 +01:00
eh_atomics.h Update copyright years. 2019-01-01 13:31:55 +01:00
eh_aux_runtime.cc Update copyright years. 2019-01-01 13:31:55 +01:00
eh_call.cc Update copyright years. 2019-01-01 13:31:55 +01:00
eh_catch.cc Update copyright years. 2019-01-01 13:31:55 +01:00
eh_exception.cc Update copyright years. 2019-01-01 13:31:55 +01:00
eh_globals.cc Update copyright years. 2019-01-01 13:31:55 +01:00
eh_personality.cc re PR target/89093 (C++ exception handling clobbers d8 VFP register) 2019-04-23 12:03:41 +02:00
eh_ptr.cc Update copyright years. 2019-01-01 13:31:55 +01:00
eh_term_handler.cc PR libstdc++/90682 allow set_terminate(0) and set_unexpected(0) 2019-05-31 11:35:11 +01:00
eh_term_handler.h PR libstdc++/90682 allow set_terminate(0) and set_unexpected(0) 2019-05-31 11:35:11 +01:00
eh_terminate.cc PR libstdc++/90682 allow set_terminate(0) and set_unexpected(0) 2019-05-31 11:35:11 +01:00
eh_throw.cc Update copyright years. 2019-01-01 13:31:55 +01:00
eh_tm.cc Update copyright years. 2019-01-01 13:31:55 +01:00
eh_type.cc Update copyright years. 2019-01-01 13:31:55 +01:00
eh_unex_handler.cc Update copyright years. 2019-01-01 13:31:55 +01:00
enum_type_info.cc Update copyright years. 2019-01-01 13:31:55 +01:00
exception Improve API docs for <system_error> header 2019-05-04 15:35:29 +01:00
exception_defines.h Update copyright years. 2019-01-01 13:31:55 +01:00
exception_ptr.h Improve API docs for <system_error> header 2019-05-04 15:35:29 +01:00
exception.h Update copyright years. 2019-01-01 13:31:55 +01:00
function_type_info.cc Update copyright years. 2019-01-01 13:31:55 +01:00
fundamental_type_info.cc Update copyright years. 2019-01-01 13:31:55 +01:00
guard_error.cc Update copyright years. 2019-01-01 13:31:55 +01:00
guard.cc Update copyright years. 2019-01-01 13:31:55 +01:00
hash_bytes.cc PR libstdc++/89629 fix _Hash_bytes for lengths > INT_MAX 2019-03-11 13:46:05 +00:00
hash_bytes.h Update copyright years. 2019-01-01 13:31:55 +01:00
initializer_list Miscellaneous API doc improvements 2019-05-02 16:46:50 +01:00
Makefile.am Update copyright years. 2019-01-01 13:31:55 +01:00
Makefile.in PR libstdc++/89466 avoid slow xsltproc command in configure 2019-02-27 11:25:44 +00:00
nested_exception.cc Update copyright years. 2019-01-01 13:31:55 +01:00
nested_exception.h Improve API docs for <system_error> header 2019-05-04 15:35:29 +01:00
new Improve API docs for <memory> and <new> 2019-05-10 22:41:11 +01:00
new_handler.cc Update copyright years. 2019-01-01 13:31:55 +01:00
new_op.cc Update copyright years. 2019-01-01 13:31:55 +01:00
new_opa.cc Remove obsolete Solaris 10 support 2019-05-14 17:17:23 +00:00
new_opant.cc Update copyright years. 2019-01-01 13:31:55 +01:00
new_opnt.cc Update copyright years. 2019-01-01 13:31:55 +01:00
new_opv.cc Update copyright years. 2019-01-01 13:31:55 +01:00
new_opva.cc Update copyright years. 2019-01-01 13:31:55 +01:00
new_opvant.cc Update copyright years. 2019-01-01 13:31:55 +01:00
new_opvnt.cc Update copyright years. 2019-01-01 13:31:55 +01:00
pbase_type_info.cc Update copyright years. 2019-01-01 13:31:55 +01:00
pmem_type_info.cc Update copyright years. 2019-01-01 13:31:55 +01:00
pointer_type_info.cc Update copyright years. 2019-01-01 13:31:55 +01:00
pure.cc Update copyright years. 2019-01-01 13:31:55 +01:00
si_class_type_info.cc Update copyright years. 2019-01-01 13:31:55 +01:00
tinfo2.cc Update copyright years. 2019-01-01 13:31:55 +01:00
tinfo.cc Update copyright years. 2019-01-01 13:31:55 +01:00
tinfo.h Update copyright years. 2019-01-01 13:31:55 +01:00
typeinfo Update copyright years. 2019-01-01 13:31:55 +01:00
unwind-cxx.h Update copyright years. 2019-01-01 13:31:55 +01:00
vec.cc Update copyright years. 2019-01-01 13:31:55 +01:00
vmi_class_type_info.cc Update copyright years. 2019-01-01 13:31:55 +01:00
vterminate.cc Update copyright years. 2019-01-01 13:31:55 +01:00
vtv_stubs.cc Update copyright years. 2019-01-01 13:31:55 +01:00