aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3/libsupc++/eh_terminate.cc
AgeCommit message (Collapse)AuthorFilesLines
2024-01-03Update copyright years.Jakub Jelinek1-1/+1
2023-01-16Update copyright years.Jakub Jelinek1-1/+1
2022-01-03Update copyright years.Jakub Jelinek1-1/+1
2021-11-04libstdc++: Deprecate std::unexpected and handler functionsJonathan Wakely1-0/+1
These functions have been deprecated since C++11, and were removed in C++17. The proposal P0323 wants to reuse the name std::unexpected for a class template, so we will need to stop defining the current function for C++23 anyway. This marks them as deprecated for C++11 and up, to warn users they won't continue to be available. It disables them for C++17 and up, unless the _GLIBCXX_USE_DEPRECATED macro is defined. The <unwind-cxx.h> header uses std::unexpected_handler in the public API, but since that type is the same as std::terminate_handler we can just use that instead, to avoid warnings about it being deprecated. libstdc++-v3/ChangeLog: * doc/xml/manual/evolution.xml: Document deprecations. * doc/html/*: Regenerate. * libsupc++/exception (unexpected_handler, unexpected) (get_unexpected, set_unexpected): Add deprecated attribute. Do not define without _GLIBCXX_USE_DEPRECATED for C++17 and up. * libsupc++/eh_personality.cc (PERSONALITY_FUNCTION): Disable deprecated warnings. * libsupc++/eh_ptr.cc (std::rethrow_exception): Likewise. * libsupc++/eh_terminate.cc: Likewise. * libsupc++/eh_throw.cc (__cxa_init_primary_exception): Likewise. * libsupc++/unwind-cxx.h (struct __cxa_exception): Use terminate_handler instead of unexpected_handler. (struct __cxa_dependent_exception): Likewise. (__unexpected): Likewise. * testsuite/18_support/headers/exception/synopsis.cc: Add dg-warning for deprecated warning. * testsuite/18_support/exception_ptr/60612-unexpected.cc: Disable deprecated warnings. * testsuite/18_support/set_unexpected.cc: Likewise. * testsuite/18_support/unexpected_handler.cc: Likewise. gcc/testsuite/ChangeLog: * g++.dg/cpp0x/lambda/lambda-eh2.C: Add dg-warning for new deprecation warnings. * g++.dg/cpp0x/noexcept06.C: Likewise. * g++.dg/cpp0x/noexcept07.C: Likewise. * g++.dg/eh/forced3.C: Likewise. * g++.dg/eh/unexpected1.C: Likewise. * g++.old-deja/g++.eh/spec1.C: Likewise. * g++.old-deja/g++.eh/spec2.C: Likewise. * g++.old-deja/g++.eh/spec3.C: Likewise. * g++.old-deja/g++.eh/spec4.C: Likewise. * g++.old-deja/g++.mike/eh33.C: Likewise. * g++.old-deja/g++.mike/eh34.C: Likewise. * g++.old-deja/g++.mike/eh50.C: Likewise. * g++.old-deja/g++.mike/eh51.C: Likewise.
2021-10-11libstdc++: Add wrapper for internal uses of std::terminateJonathan Wakely1-1/+1
This adds an inline wrapper for std::terminate that doesn't add the declaration of std::terminate to namespace std. This allows the library to terminate without including all of <exception>. libstdc++-v3/ChangeLog: * include/bits/atomic_timed_wait.h: Remove unused header. * include/bits/c++config (std:__terminate): Define. * include/bits/semaphore_base.h: Remove <exception> and use __terminate instead of terminate. * include/bits/std_thread.h: Likewise. * libsupc++/eh_terminate.cc (std::terminate): Use qualified-id to call __cxxabiv1::__terminate.
2021-01-04Update copyright years.Jakub Jelinek1-1/+1
2020-01-01Update copyright years.Jakub Jelinek1-1/+1
From-SVN: r279813
2019-05-31PR libstdc++/90682 allow set_terminate(0) and set_unexpected(0)Jonathan Wakely1-0/+7
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-01-01Update copyright years.Jakub Jelinek1-1/+1
From-SVN: r267494
2018-01-03Update copyright years.Jakub Jelinek1-1/+1
From-SVN: r256169
2017-01-01Update copyright years.Jakub Jelinek1-1/+1
From-SVN: r243994
2016-01-04Update copyright years.Jakub Jelinek1-1/+1
From-SVN: r232055
2015-01-05Update copyright years.Jakub Jelinek1-1/+1
From-SVN: r219188
2014-01-02Update copyright years in libstdc++-v3/Richard Sandiford1-1/+1
From-SVN: r206301
2013-04-05re PR libstdc++/56841 (ld: Unsatisfied symbol "__atomic_exchange_8" in file ↵Jonathan Wakely1-0/+31
/test/gnu/gcc/objdir/prev-hppa64-hp-hpux11.11/libstdc++-v3/src/.libs/libstdc++.a[eh_terminate.o]) PR libstdc++/56841 * libsupc++/eh_ptr.cc (rethrow_exception): Use get_unexpected() and get_terminate() accessors. * libsupc++/eh_throw.cc (__cxa_throw): Likewise. * libsupc++/eh_terminate.cc: Use mutex when atomic builtins not available. * libsupc++/new_handler.cc: Likewise. From-SVN: r197512
2013-04-03exception (get_terminate(), [...]): Declare.Jonathan Wakely1-6/+22
* libsupc++/exception (get_terminate(), get_unexpected()): Declare. * libsupc++/eh_terminate.cc (get_terminate() , set_unexpected()): Define. (set_terminate(terminate_handler)): Set atomically. (set_unexpected(terminate_handler)): Likewise. * libsupc++/new (get_new_handler()): Declare. * libsupc++/new_handler.cc (get_new_handler()): Define. (set_new_handler(new_handler)): Set atomically. (__new_handler): Use internal linkage. * libsupc++/new_op.cc (operator new): Use get_new_handler(). * libsupc++/new_opnt.cc (operator new): Likewise. * acinclude.m4: Bump libtool_VERSION to 6:19:0. * configure: Regenerate. * libsupc++/Makefile.am: Compile above files with -std=gnu++11. * libsupc++/Makefile.in: Regenerate. * config/abi/pre/gnu.ver: Add new exports. * doc/xml/manual/status_cxx2011.xml: Update. * testsuite/18_support/headers/exception/synopsis.cc: Check accessors for handlers. * testsuite/18_support/headers/new/synopsis.cc: Likewise. * testsuite/18_support/new_handler.cc: New. * testsuite/18_support/terminate_handler.cc: New. * testsuite/18_support/unexpected_handler.cc: New. From-SVN: r197380
2013-02-03Update copyright in libstdc++-v3.Richard Sandiford1-3/+1
From-SVN: r195701
2011-01-15re PR libstdc++/36104 (gnu-versioned-namespace is broken)Benjamin Kosnik1-2/+3
2011-01-14 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/36104 * include/Makefile.am (bits_sup_headers, stamp-bits-sup): New. * include/Makefile.in: Regenerate. * libsupc++/Makefile.am (std_HEADERS, bits_HEADERS): New. (install-stdHEADERS, install-bitsHEADERS): New. * libsupc++/Makefile.in: Regenerate. * include/bits/c++config: Update for inline namespaces. * libsupc++/cxxabi-forced.h: To... * libsupc++/cxxabi_forced.h: ...this. * libsupc++/hash_bytes.h: Separate file. * libsupc++/typeinfo: Use it. * libsupc++/exception: Adjust for bits subdirectory. * libsupc++/eh_aux_runtime.cc: Same. * libsupc++/eh_ptr.cc: Same. * libsupc++/new_op.cc: Same. * libsupc++/exception_defines.h: Same. * libsupc++/nested_exception.h: Same. * libsupc++/eh_terminate.cc: Same. * libsupc++/vec.cc: Same. * libsupc++/vterminate.cc: Same. * libsupc++/exception_ptr.h: Same. * libsupc++/eh_personality.cc: Same. * libsupc++/eh_call.cc: Same. * libsupc++/new_opnt.cc: Same. * libsupc++/hash_bytes.cc: Same. * config/cpu/arm/cxxabi_tweaks.h: Same. * config/cpu/generic/cxxabi_tweaks.h: Same. * libsupc++/cxxabi.h: Same. Consolidate _GLIBCXX_NOTHROW defines. * include/std/bitset: Same. * include/ext/vstring.tcc: Same. * include/bits/hashtable.h: Same. * include/bits/functional_hash.h: Same. * include/bits/hashtable_policy.h: Same. * include/bits/basic_string.h: Same. * include/bits/istream.tcc: Same. * include/bits/ostream.tcc: Same. * include/bits/algorithmfwd.h: Same. * include/bits/basic_string.tcc: Same. * include/bits/ostream_insert.h: Same. * include/bits/fstream.tcc: Same. * include/bits/functexcept.h: Same. * doc/doxygen/user.cfg.in: Adjust names. * testsuite/ext/profile/mutex_extensions_neg.cc: Adjust line numbers. From-SVN: r168831
2009-09-29eh_terminate.cc: Fixes for -fno-exceptions.Benjamin Kosnik1-6/+7
2009-09-28 Benjamin Kosnik <bkoz@redhat.com> * libsupc++/eh_terminate.cc: Fixes for -fno-exceptions. * libsupc++/vec.cc: Same. * libsupc++/vterminate.cc: Same. * libsupc++/new_opnt.cc: Same. From-SVN: r152258
2009-04-18* eh_type.cc (__cxa_current_exception_type) Mark throw().Jan Hubicka1-2/+2
* unwind-cxx.h (__cxa_get_globals, __cxa_get_globals_fast): Mark const. (__cxa_get_exception_ptr): Mark pure. (__cxa_bad_cast, __cxa_bad_typeid): Mark noreturn (__terminate): Makr throw (). * exception (terminate): Mark throw(). (uncaught_exception): Mark pure. * eh_ptr.cc (_M_safe_bool_dummy): Mark throw(). * guard.cc (__cxa_guard_abort, __cxa_guard_release): Mark throw(). * eh_terminate.cc (__terminate, terminate): Mark throw(). * vec.cc (__cxa_vec_cleanup): Mark throw(). * cxxabi.h (__cxa_vec_cleanup, __cxa_guard_release, __cxa_guard_abort): Mark throw (). (__cxa_pure_virtual): Mark noreturn. (__cxa_current_exception_type): Mark throw and pure. * exception_ptr.h (operator ==, !=, _M_get, !, ==, __cxa_exception_type): Mark pure. (_M_safe_bool_dummy): Mark pure and const. From-SVN: r146331
2009-04-09Licensing changes to GPLv3 resp. GPLv3 with GCC Runtime Exception.Jakub Jelinek1-14/+9
From-SVN: r145841
2005-08-17All files: Update FSF address.Kelley Cook1-2/+2
2005-08-17 Kelley Cook <kcook@gcc.gnu.org> * All files: Update FSF address. From-SVN: r103192
2003-05-24Makefile.am, [...]: Replace "GNU CC" with "GCC".Nathanael Nerode1-4/+4
2003-05-24 Nathanael Nerode <neroden@gcc.gnu.org> * libsupc++/Makefile.am, libsupc++/cxxabi.h, libsupc++/del_op.cc, libsupc++/del_opnt.cc, libsupc++/del_opv.cc, libsupc++/del_opvnt.cc, libsupc++/eh_alloc.cc, libsupc++/eh_aux_runtime.cc, libsupc++/eh_catch.cc, libsupc++/eh_exception.cc, libsupc++/eh_globals.cc, libsupc++/eh_personality.cc, libsupc++/eh_term_handler.cc, libsupc++/eh_terminate.cc, libsupc++/eh_throw.cc, libsupc++/eh_type.cc, libsupc++/eh_unex_handler.cc, libsupc++/exception, libsupc++/new, libsupc++/new_handler.cc, libsupc++/new_op.cc, libsupc++/new_opnt.cc, libsupc++/new_opv.cc, libsupc++/new_opvnt.cc, libsupc++/pure.cc, libsupc++/tinfo.cc, libsupc++/tinfo2.cc, libsupc++/typeinfo, libsupc++/unwind-cxx.h, libsupc++/vec.cc: Replace "GNU CC" with "GCC". From-SVN: r67155
2002-12-26vterminate.cc: Move to...Phil Edwards1-5/+1
2002-12-25 Phil Edwards <pme@gcc.gnu.org> * src/vterminate.cc: Move to... * libsupc++/vterminate.cc: ...here. New file. Replace fprintf with writestr macro. Slight reword to explanatory text. * libsupc++/eh_terminate.cc (__cxxabiv1::__terminate_handler, __cxxabiv1::__unexpected_handler): Break definitions out to... * libsupc++/eh_unex_handler.cc: ...here (new file), and... * libsupc++/eh_term_handler.cc: ...here (new file). Initialize __terminate_handler with __gnu_cxx::__verbose_terminate_handler instead of std::abort. * libsupc++/Makefile.am (sources), src/Makefile.am (sources): Update. * libsupc++/Makefile.in, src/Makefile.in: Regenerate. From-SVN: r60505
2001-06-09acinclude.m4 (GLIBCPP_CHECK_WCHAR_T_SUPPORT): Check for fgetwc, fgetws.Benjamin Kosnik1-3/+3
2001-06-09 Benjamin Kosnik <bkoz@redhat.com> * acinclude.m4 (GLIBCPP_CHECK_WCHAR_T_SUPPORT): Check for fgetwc, fgetws. * aclocal.m4: Regenerate. * configure: Regenerate. * include/c_std/bits/std_cwchar.h: Remove duplicate fgetwc injection, guard fgetwc, fgetws. * include/c_std/bits/std_cstdio.h: Remove superfluous includes. * include/c_std/bits/std_clocale.h: And here. * include/c_std/bits/std_cctype.h: And here. * include/c_std/bits/std_cstdlib.h (strtof): Guard strtof injection. * config/basic_file_stdio.h: Don't include unistd.h. * config/c_io_stdio.h: Don't use compatibility headers. * libsupc++/eh_terminate.cc: Qualify abort. (__terminate): And here. * libsupc++/eh_catch.cc (__cxa_end_catch): Qualify abort. From-SVN: r43070
2001-03-28IA-64 ABI Exception Handling.Richard Henderson1-0/+87
From-SVN: r40924