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: -ffast-math and floating point reordering


On Fri, 2004-03-26 at 17:21, law@redhat.com wrote:
> The question then becomes whether or not -ffast-math ought to turn that
> flag on.  I'm neither a significant user or expert in FP arithmetic.  So
> I've got no strong opinions here.

Given our documentation which promises nothing about results, it's clear
that it can go in. 

Laurent

<<
@item -ffast-math
@opindex ffast-math
Sets @option{-fno-math-errno}, @option{-funsafe-math-optimizations}, @*
@option{-fno-trapping-math}, @option{-ffinite-math-only},
@option{-fno-rounding-math} and @option{-fno-signaling-nans}.

This option causes the preprocessor macro @code{__FAST_MATH__} to be
defined.

This option should never be turned on by any @option{-O} option since
it can result in incorrect output for programs which depend on
an exact implementation of IEEE or ISO rules/specifications for
math functions.
...
@item -funsafe-math-optimizations
@opindex funsafe-math-optimizations
Allow optimizations for floating-point arithmetic that (a) assume
that arguments and results are valid and (b) may violate IEEE or
ANSI standards.  When used at link-time, it may include libraries
or startup files that change the default FPU control word or other
similar optimizations.


>>



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