This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: c++ exceptions and signals
- To: Peter dot Maunz at uni-konstanz dot de, egcs at egcs dot cygnus dot com
- Subject: Re: c++ exceptions and signals
- From: mrs at wrs dot com (Mike Stump)
- Date: Mon, 11 Jan 1999 17:25:16 -0800
> Date: Mon, 11 Jan 1999 12:59:24 +0100 (MET)
> From: Peter Maunz <pmaunz@eraser.physik.uni-konstanz.de>
> If I write a signalhandler and throw an exception there I don't manage to
> catch this exception in the main program.
You can try it using -fsjlj-exceptions, it should almost work. Where
almost is a definition you have to decide if you are willing to
accept. In the short program you gave, it is almost reasonable. You
may also want to give -fasynchronous-exceptions flag when compiling.
If you want it to work with the other EH scheme, you will have to
teach something to throw through the signal handler.