[LLVMdev] Why clang++ doesn't set 'noreturn' flag on declarations of __cxa_throw and _Unwind_Resume_or_Rethrow ?

John McCall rjmccall at apple.com
Fri Jul 16 16:09:43 PDT 2010

On Jul 16, 2010, at 4:01 PM, Bill Wendling wrote:

> On Jul 15, 2010, at 6:52 PM, Yuri wrote:
>> On 07/15/2010 18:30, Bill Wendling wrote:
>>> It's not. But if the unwind library can't handle something, then the _Unwind_Resume_or_Rethrow could fall out of the function (it would assert in debug mode). Darwin's implementation of _URoR in libunwind does this.
>> Isn't unwind library supposed to call terminate() every time it can't handle something?
> I don't see anything specifying that it should call terminate() in the exception ABI document:
> 	http://www.codesourcery.com/public/cxx-abi/abi-eh.html

If the unwind state is broken, we're well into who-really-cares-what-happens state.  I
would abstractly prefer if URR just called abort() because it doesn't disguise the problem,
but whatever.


More information about the llvm-dev mailing list