This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: -ffast-math and floating point reordering
- From: Laurent GUERBY <laurent at guerby dot net>
- To: law at redhat dot com
- Cc: Joe Buck <Joe dot Buck at synopsys dot COM>, gcc at gcc dot gnu dot org
- Date: Fri, 26 Mar 2004 19:49:12 +0100
- Subject: Re: -ffast-math and floating point reordering
- References: <200403261621.i2QGLQ7X014994@speedy.slc.redhat.com>
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.
>>