This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
non-call-exceptions
- From: "Payne, Robert, ALABS" <paynerobert at att dot com>
- To: <gcc-help at gcc dot gnu dot org>
- Date: Thu, 23 Jan 2003 12:57:08 -0500
- Subject: non-call-exceptions
I'm trying to figure out if -fnon-call-exceptions does what I want it to do, and if so, how to make it do it. Perhaps someone on the list can help?
I have a threaded program (large) written in C++ which may at some point generate a SIGSEGV or SIGFPE synchronous signal. I'm wanting to install a signal handler to catch that sig to prevent the abort. I'd really like to throw() from there and catch the exception at a lower level, with stack unwinding so that I get object destructions.
I know that throwing from a signal handler is not supported (undefined) per the standard, but then I noticed the non-call-exceptions option to the compiler. When I run the test driver I've built and attempt to catch the synchronous SIGFPE in a handler, the throw causes a core dump, even with the non-call-exceptions option enabled. Ok, I'm doing something wrong, either I've misinterpreted the option which I thought would allow me to unwind the stack, or I'm not doing some setup, or ...???
Anyone out there ever try to do anything like this?
--Bob