catch(...) and forced unwind

Richard Henderson rth@redhat.com
Mon Dec 15 22:52:00 GMT 2003


On Mon, Dec 15, 2003 at 04:39:06PM -0600, Benjamin Kosnik wrote:
> Ok. So, just to clarify: 
> 
> void __rethrow_cancellation() 
> { 
>     // something else
> }
> 
> might be valid (given sufficient smarts, not given at the moment), or
> the whole idea is shot?

The only thing that would work is

  void __rethrow_cancellation() { }

and then do something like

  if (get_cancelation_handler() == __rethrow_cancellation)
    _Unwind_Resume (current_exception);

in __cxa_end_catch.  Which seems kinda gross to me.

Keep in mind that __cancel_cancellation WILL NOT WORK without help from
and buy-in from the pthread library.  Which does not currently exist.


r~



More information about the Gcc mailing list