This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Trap floating-point exceptions?
- From: Ben Elliston <bje at au1 dot ibm dot com>
- To: "Ralf W. Grosse-Kunstleve" <rwgk at yahoo dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Mon, 17 Sep 2007 15:37:52 +1000
- Subject: Re: Trap floating-point exceptions?
- References: <106855.53449.qm@web31102.mail.mud.yahoo.com>
On Sun, 2007-09-16 at 20:51 -0700, Ralf W. Grosse-Kunstleve wrote:
> Under Linux, gcc/g++-compiled code happily continues running after
> producing NAN and INF. Often it is time-consuming to backtrack to the
> actual source of the numerical problems. In addition, such problems may
> go undetected for some time, which can cause all kinds of confusion.
Yes, NaNs are quiet by default.
> Other platforms stop after a floating-point exception (e.g. HP's Tru64 Unix
> with cc/cxx), or support customizations of FPE behavior via environment
> variables (e.g. SGI's old IRIX). Is something like this possible with
> gcc/g++ under Linux?
This really has very little to do with GCC -- this list is for GCC
development. Please try asking on the gcc-help mailing list, or a C
programming list.
Cheers, Ben