[Bug c++/95741] Optimization skips destructor and calls set_terminate directly
redi at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Jun 18 13:30:34 GMT 2020
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95741
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever confirmed|0 |1
Last reconfirmed| |2020-06-18
--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
[except.terminate] allows std::terminate to be called without stack unwinding
in some cases, but I don't think that applies here. The standard specifically
says "An implementation is not permitted to finish stack unwinding prematurely
based on a determination that the unwind process will eventually cause a call
to std::terminate()." That seems to be what's happening here.
More information about the Gcc-bugs
mailing list