This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Throwing C++ exceptions from signal handlers
> > is it possible to somehow convince gcc to properly throw an exception
from a
> > signal handler context?
>
> Yes, but only with synchronous exceptions like SIGSEGV and SIGFPE.
That's good news - but how? How should I modify the sample program so that
it won't abort with gcc? Or should I use different flags?
>
> > In particular, I'd like to get the following program to run on Linux
with
> > gcc. On Solaris (with Sun's compiler) it works fine.
>
> Hmm. This is a difficult thing to do in the general case. It raises
> all sorts of problems to do with destructors and cleanup regions.