f4130a3eb5
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. |
||
---|---|---|
.. | ||
doxygen | ||
html | ||
xml | ||
xsl | ||
Makefile.am | ||
Makefile.in |