This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Exception handling
- From: Jeff Sturm <jsturm at one-point dot com>
- To: Fergus Henderson <fjh at cs dot mu dot OZ dot AU>
- Cc: "Serguei I. Ivantsov" <admin at gsc-game dot kiev dot ua>, <gcc at gcc dot gnu dot org>
- Date: Tue, 27 Aug 2002 12:32:48 -0400 (EDT)
- Subject: Re: Exception handling
> On 26-Aug-2002, Serguei I. Ivantsov <admin@gsc-game.kiev.ua> wrote:
> > Please help me with exception handling under gcc
> > ...
> > Execution stops after "Floating point exception" and never riches catch
> > section.
It seems the term "exception" is confusingly overloaded in the OP's
message.
The try...catch construct is intended to handle C++ exceptions, not signals.
A "floating point exception" from the OS has nothing to do with the
former.
On Wed, 28 Aug 2002, Fergus Henderson wrote:
> This code is not portable. According to the ANSI/ISO C++ 98 standard,
> your program has undefined behaviour.
Right. In GCC, it is sometimes possible to throw exceptions from signal
handlers, however it is not portable. There are examples in libgcj.
Jeff