This is the mail archive of the 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: RFC: Improving GCC8 default option settings

On Tue, 12 Sep 2017, Alexander Monakov wrote:

> > * Make -fno-trapping-math the default - another obvious one. From the docs:
> >   "Compile code assuming that floating-point operations cannot generate 
> >    user-visible traps."
> >   There isn't a lot of code that actually uses user-visible traps (if any -
> >   many CPUs don't even support user traps as it's an optional IEEE feature). 
> >   So assuming trapping math by default is way too conservative since there is
> >   no obvious benefit to users. 
> OTOH -O options are understood to _never_ sacrifice standards compliance, with
> the exception of -Ofast.  I believe that's an important property to keep.

ISO C allows the FENV_ACCESS pragma to be OFF by default (we don't support 
the standard pragmas, but FENV_ACCESS ON is equivalent to a stricter 
version of -frounding-math -ftrapping-math).  Thus, this is not a 
standards compliance issue (unlike various parts of -ffast-math that break 
IEEE 754 semantics even with FENV_ACCESS OFF).  And since 
-fno-rounding-math is the default, the default is already a form of 

I don't think any -O implication of -fno-trapping-math was proposed; the 
proposal was about the default (independent of -O options).

Joseph S. Myers

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