summaryrefslogtreecommitdiff
path: root/gcc/fortran/invoke.texi
diff options
context:
space:
mode:
authorjb <jb@138bc75d-0d04-0410-961f-82ee72b054a4>2011-05-20 12:55:45 +0000
committerjb <jb@138bc75d-0d04-0410-961f-82ee72b054a4>2011-05-20 12:55:45 +0000
commit98b28ab670569a961b4f56a5d4bca75fea37cadc (patch)
tree7735a57324efcc39f0b3ab6c3034917ad7641e3b /gcc/fortran/invoke.texi
parentc9819bb0b71ef1482e77c91e7959500fcf261de0 (diff)
downloadgcc-98b28ab670569a961b4f56a5d4bca75fea37cadc.tar.gz
Clarify FP exception documentation and messages
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@173944 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fortran/invoke.texi')
-rw-r--r--gcc/fortran/invoke.texi40
1 files changed, 25 insertions, 15 deletions
diff --git a/gcc/fortran/invoke.texi b/gcc/fortran/invoke.texi
index ab45072efad..41fee670a6c 100644
--- a/gcc/fortran/invoke.texi
+++ b/gcc/fortran/invoke.texi
@@ -919,21 +919,31 @@ GNU Fortran compiler itself. This option is deprecated; use
@item -ffpe-trap=@var{list}
@opindex @code{ffpe-trap=}@var{list}
-Specify a list of IEEE exceptions when a Floating Point Exception
-(FPE) should be raised. On most systems, this will result in a SIGFPE
-signal being sent and the program being interrupted, producing a core
-file useful for debugging. @var{list} is a (possibly empty) comma-separated
-list of the following IEEE exceptions: @samp{invalid} (invalid floating
-point operation, such as @code{SQRT(-1.0)}), @samp{zero} (division by
-zero), @samp{overflow} (overflow in a floating point operation),
-@samp{underflow} (underflow in a floating point operation),
-@samp{precision} (loss of precision during operation) and @samp{denormal}
-(operation produced a denormal value).
-
-Some of the routines in the Fortran runtime library, like
-@samp{CPU_TIME}, are likely to trigger floating point exceptions when
-@code{ffpe-trap=precision} is used. For this reason, the use of
-@code{ffpe-trap=precision} is not recommended.
+Specify a list of floating point exception traps to enable. On most
+systems, if a floating point exception occurs and the trap for that
+exception is enabled, a SIGFPE signal will be sent and the program
+being aborted, producing a core file useful for debugging. @var{list}
+is a (possibly empty) comma-separated list of the following
+exceptions: @samp{invalid} (invalid floating point operation, such as
+@code{SQRT(-1.0)}), @samp{zero} (division by zero), @samp{overflow}
+(overflow in a floating point operation), @samp{underflow} (underflow
+in a floating point operation), @samp{inexact} (loss of precision
+during operation), and @samp{denormal} (operation performed on a
+denormal value). The first five exceptions correspond to the five
+IEEE 754 exceptions, whereas the last one (@samp{denormal}) is not
+part of the IEEE 754 standard but is available on some common
+architectures such as x86.
+
+The first three exceptions (@samp{invalid}, @samp{zero}, and
+@samp{overflow}) often indicate serious errors, and unless the program
+has provisions for dealing with these exceptions, enabling traps for
+these three exceptions is probably a good idea.
+
+Many, if not most, floating point operations incur loss of precision
+due to rounding, and hence the @code{ffpe-trap=inexact} is likely to
+be uninteresting in practice.
+
+By default no exception traps are enabled.
@item -fno-backtrace
@opindex @code{fno-backtrace}