catch(...) and forced unwind
Benjamin Kosnik
bkoz@redhat.com
Mon Dec 15 23:05:00 GMT 2003
>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.
Huh! So, it is possible.
Maybe this is gross to you, but this is pretty much the way the
terminate handler works.
FWIW, I don't think this is too bad, and at least it gives people options.
>Keep in mind that __cancel_cancellation WILL NOT WORK without help from
>and buy-in from the pthread library. Which does not currently exist.
Perhaps you mean __continue_cancellation? What's needed from the
pthreads library to make this work?
-benjamin
More information about the Gcc
mailing list