aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/lambda.c
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2019-05-31 11:35:11 +0100
committerJonathan Wakely <redi@gcc.gnu.org>2019-05-31 11:35:11 +0100
commit3228289e1efc9712b12f5ce7d6a0ef5cfca11f0d (patch)
tree904ea855a043d873ca2e0eb6ba020f869fb4e4bd /gcc/cp/lambda.c
parent3263fb9c6b90b565fc6ca4d2ce9247b97b4027d3 (diff)
downloadgcc-3228289e1efc9712b12f5ce7d6a0ef5cfca11f0d.zip
gcc-3228289e1efc9712b12f5ce7d6a0ef5cfca11f0d.tar.gz
gcc-3228289e1efc9712b12f5ce7d6a0ef5cfca11f0d.tar.bz2
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
Diffstat (limited to 'gcc/cp/lambda.c')
0 files changed, 0 insertions, 0 deletions