Explicit catch of forced unwind
Mark Mitchell
mark at codesourcery.com
Sun Apr 15 20:51:05 UTC 2007
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 at codesourcery.com
(650) 331-3385 x713
More information about the c++-pthreads
mailing list