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
atexit_arm.cc
atexit_thread.cc
atomic_lockfree_defines.h
bad_alloc.cc
bad_array_length.cc
bad_array_new.cc
bad_cast.cc
bad_typeid.cc
class_type_info.cc
cxxabi_forced.h
cxxabi_init_exception.h
cxxabi.h
del_op.cc
del_opa.cc
del_opant.cc
del_opnt.cc
del_ops.cc
del_opsa.cc
del_opv.cc
del_opva.cc
del_opvant.cc
del_opvnt.cc
del_opvs.cc
del_opvsa.cc
dyncast.cc
eh_alloc.cc
eh_arm.cc
eh_atomics.h
eh_aux_runtime.cc
eh_call.cc
eh_catch.cc
eh_exception.cc
eh_globals.cc
eh_personality.cc
eh_ptr.cc
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
eh_tm.cc
eh_type.cc
eh_unex_handler.cc
enum_type_info.cc
exception Improve API docs for <system_error> header 2019-05-04 15:35:29 +01:00
exception_defines.h
exception_ptr.h Improve API docs for <system_error> header 2019-05-04 15:35:29 +01:00
exception.h
function_type_info.cc
fundamental_type_info.cc
guard_error.cc
guard.cc
hash_bytes.cc
hash_bytes.h
initializer_list
Makefile.am
Makefile.in
nested_exception.cc
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
new_op.cc
new_opa.cc Remove obsolete Solaris 10 support 2019-05-14 17:17:23 +00:00
new_opant.cc
new_opnt.cc
new_opv.cc
new_opva.cc
new_opvant.cc
new_opvnt.cc
pbase_type_info.cc
pmem_type_info.cc
pointer_type_info.cc
pure.cc
si_class_type_info.cc
tinfo2.cc
tinfo.cc
tinfo.h
typeinfo
unwind-cxx.h
vec.cc
vmi_class_type_info.cc
vterminate.cc
vtv_stubs.cc