This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]