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
| Name |
Last commit
|
Last update |
|---|---|---|
| .. | ||
| aligned_alloc | Loading commit data... | |
| bad_alloc | Loading commit data... | |
| bad_cast | Loading commit data... | |
| bad_exception | Loading commit data... | |
| bad_typeid | Loading commit data... | |
| byte | Loading commit data... | |
| exception | Loading commit data... | |
| exception_ptr | Loading commit data... | |
| headers | Loading commit data... | |
| initializer_list | Loading commit data... | |
| launder | Loading commit data... | |
| max_align_t/requirements | Loading commit data... | |
| nested_exception | Loading commit data... | |
| numeric_limits | Loading commit data... | |
| quick_exit | Loading commit data... | |
| type_info | Loading commit data... | |
| uncaught_exception | Loading commit data... | |
| uncaught_exceptions | Loading commit data... | |
| 50594.cc | Loading commit data... | |
| cxa_vec.cc | Loading commit data... | |
| destroying_delete.cc | Loading commit data... | |
| free_eh_pool.cc | Loading commit data... | |
| new_aligned.cc | Loading commit data... | |
| new_delete_placement.cc | Loading commit data... | |
| new_handler.cc | Loading commit data... | |
| new_nothrow.cc | Loading commit data... | |
| pthread_guard.cc | Loading commit data... | |
| set_terminate.cc | Loading commit data... | |
| set_unexpected.cc | Loading commit data... | |
| terminate_handler.cc | Loading commit data... | |
| unexpected_handler.cc | Loading commit data... |