From 1bdfc7aab0be819a3ab8cf2a2b4162ab203d94d5 Mon Sep 17 00:00:00 2001 From: Dominique d'Humieres Date: Sat, 2 Feb 2019 22:44:34 +0100 Subject: [PATCH] re PR fortran/81344 (Can't disable -ffpe-trap (or not documented)) 2019-02-02 Dominique d'Humieres PR fortran/81344 * invoke.texi: Document the behavior of repeated -ffpe-trap and -ffpe-summary. From-SVN: r268480 --- gcc/fortran/ChangeLog | 6 ++++++ gcc/fortran/invoke.texi | 9 +++++++++ 2 files changed, 15 insertions(+) diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 622af1e3902..6f0e9e69495 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,9 @@ +2019-02-02 Dominique d'Humieres + + PR fortran/81344 + * invoke.texi: Document the behavior of repeated -ffpe-trap + and -ffpe-summary. + 2019-02-02 Thomas Koenig PR fortran/88298 diff --git a/gcc/fortran/invoke.texi b/gcc/fortran/invoke.texi index deaf8eba102..0e0c2bcb20d 100644 --- a/gcc/fortran/invoke.texi +++ b/gcc/fortran/invoke.texi @@ -1203,6 +1203,12 @@ The first three exceptions (@samp{invalid}, @samp{zero}, and has provisions for dealing with these exceptions, enabling traps for these three exceptions is probably a good idea. +If the option is used more than once in the command line, the lists will +be joined: '@code{ffpe-trap=}@var{list1} @code{ffpe-trap=}@var{list2}' +is equivalent to @code{ffpe-trap=}@var{list1,list2}. + +Note that once enabled an exception cannot be disabled (no negative form). + 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. @@ -1218,6 +1224,9 @@ of the following exceptions: @samp{invalid}, @samp{zero}, @samp{overflow}, @samp{underflow}, @samp{inexact} and @samp{denormal}. (See @option{-ffpe-trap} for a description of the exceptions.) +If the option is used more than once in the command line, only the +last one will be used. + By default, a summary for all exceptions but @samp{inexact} is shown. @item -fno-backtrace -- 2.11.4.GIT