[ Date Prev][ Date Next][ Thread Prev][ Thread Next][ Date Index][ Thread Index]
Re: [cxx-abi-dev] __cxa_vec_new2 and deallocation functions that throw exceptions
- To: Dennis Handly <dhandly@xxxxxxxxxx>
- Subject: Re: [cxx-abi-dev] __cxa_vec_new2 and deallocation functions that throw exceptions
- From: Mark Mitchell <mark@xxxxxxxxxxxxxxxx>
- Date: 15 May 2003 00:38:19 -0700
On Thu, 2003-05-15 at 00:13, Dennis Handly wrote:
> >[except.terminate]
> > --when the exception handling mechanism, after completing evaluation
> > of the expression to be thrown but before the exception is caught
> > (_except.throw_), calls a user function that exits via an uncaught
> > exception,1)
>
> So what does uncaught exception mean? Any exception without a handler?
> (That footnote needs to be expanded.)
>
> Or anytime you throw when uncaught_exception is true, 18.6.4(2)?
>
> This disallows throws that are caught locally in destructors, while
> unwinding. Or is this not "exiting", so legal?
A function can exit either by use of "return" (including falling off the
end of the function), by throwing exception, or by calling longjmp. If
a destructor catches the exception, it does not exit by throwing an
exception.
So, yes, the situation you describe is legal.
--
Mark Mitchell <mark@xxxxxxxxxxxxxxxx>
CodeSourcery, LLC
|