[cxx-abi-dev] Details missing for EH 2.4.1 Overview of Throw Processing

Dennis Handly dhandly at cup.hp.com
Tue Dec 20 22:30:11 UTC 2011


>From: John McCall <rjmccall at apple.com>
>>> We only terminate if an exception is thrown after the initialization is
>>> complete, e.g.  by a destructor of that full-expression,
>> 
>> So does this need to be mentioned for __cxa_end_catch or is it the generated
>> cleanup code for the throw?

>I don't know what you mean.  __cxa_end_catch is not required
>as part of the generated code for a throw expression.  I don't think it
>ever was.

I'm saying that __cxa_end_catch is the code that destructs the
full-expression, if you elide the copy construction.

>> g++ seems to not disallow that throw in __cxa_end_catch.
>> aC++ does too but does get lost if a catch is present.

>In general, the generated call to __cxa_end_catch at the end of a
>catch clause can throw.  You can prove that it can't in some cases,
>based on the caught exception object type or the CFG of the catch clause.
John.

I thought you said that the destructor can't throw and if it does, it calls
terminate?

In our runtime lib, there is nothing else that can throw.



More information about the cxx-abi-dev mailing list