Actions

icon Post
text/html Subscribe
text/html Unsubscribe

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Explicit catch of forced unwind


  • To: Jason Merrill <jason@xxxxxxxxxx>
  • Subject: Re: Explicit catch of forced unwind
  • From: Mark Mitchell <mark@xxxxxxxxxxxxxxxx>
  • Date: Sun, 15 Apr 2007 13:51:05 -0700

Jason Merrill wrote:

>> I think this is a good idea.  Would you like to propose a patch to the
>> C++ ABI HTML document?  In addition to the new class, I think you will
>> have to adjust the forced-unwinding specification to say that it is
>> not possible to catch such an exception
> 
> Hmm?  I'm proposing to catch it explicitly.  Do you mean that you don't
> think it's necessary for catch (...) to catch forced unwind if we
> provide a means to catch it separately?

I forget the exact context, so I'm not sure what I meant. :-)

However, I think catching the unwind exception explicitly makes sense,
and I do continue to think that "catch (...)" ought to catch the unwind
exception.

> My current implementation doesn't do this, it just changes the
> personality function to magically match a forced unwind with the
> __forced_unwind type.

I see; that's clever.  I also see that your proposed changes to the
specification forbid users from poking at the exception object,
presumably to permit this implementation technique.

However, the "accessed in any way" language would also seem to forbid
rethrowing the exception (via "throw;").  Did you meant to forbid that?
 If so, why?

-- 
Mark Mitchell
CodeSourcery
mark@xxxxxxxxxxxxxxxx
(650) 331-3385 x713