https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98785
Bug ID: 98785 Summary: _Unwind_ForcedUnwind going through a non-empty exception specification Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: i at maskray dot me Target Milestone: --- gcc/testsuite/g++.dg/eh/forced3.C says forced unwinding calls std::unexpected going through a throw() function. gcc/testsuite/g++.dg/eh/forced4.C says forced unwinding does not call std::unexpected going through a throw(int) function. The behavior looks strange: if we consider forced unwinding a special exception type, both throw() and throw(int) should catch it. Note: for nothrow, GCC emits minimum amount of .gcc_except_table section. forced unwinding calls std::terminate.