Order of destructor call of temporary and __cxa_throw #62062
Labels
clang:codegen
IR generation bugs: mangling, exceptions, etc.
question
A question, not bug report. Check out https://llvm.org/docs/GettingInvolved.html instead!
Uh oh!
There was an error while loading. Please reload this page.
I might have found an issue with the order of destructor call of a temporary and the call to the
__cxa_throw
function within athrow
statement.In the following code, the Clang frontend first calls
__cxa_throw
and afterwardsa::~a
. See https://godbolt.org/z/jbx74s1GeGCC generates it in opposite order which is more logical to me. ICC generates it in the same order as Clang. I don't know what is correct from the C++ standard, maybe it is undefined.
The text was updated successfully, but these errors were encountered: