Help: Unwinding the C++ stack...throw, longjmp & threads

George T. Talbot george@moberg.com
Tue Aug 31 23:20:00 GMT 1999


Josh Stern wrote:
> 
> >Making try, catch, and throw available in C would be a nice GNU
> >extension,
> >eh?  ;^)  I could then put:
> >
> >        throw POSIX_cancel;
> >
> >in the linuxthreads library directly, for unwinding the stack at
> >deferred
> >cancellation, rather than having a .cc file in there (horrors).
> 
> If this extension would allow exceptions to be thrown from
> Unix signal handlers, that would be a very cool feature
> for even non-threaded programs.
> 
> - Josh

Not sure.  With pthread_cancel(), in deferred cancellation mode, I'm
guaranteed the exception would only be thrown at cancellation points.

--
George T. Talbot
<george@mboerg.com>



More information about the Gcc mailing list