This is the mail archive of the
mailing list for the GCC project.
Re: Setting -frounding-math by default
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: Sylvain Pion <Sylvain dot Pion at sophia dot inria dot fr>
- Cc: gcc at gcc dot gnu dot org, roger at eyesopen dot com
- Date: Sun, 8 Mar 2009 19:26:04 +0000 (UTC)
- Subject: Re: Setting -frounding-math by default
- References: <49B41836.email@example.com>
On Sun, 8 Mar 2009, Sylvain Pion wrote:
> introduced the -frounding-math option, and changed
> the default behavior of GCC to optimize "unsafely".
That is a misleading description. The cautionary text added by that patch
is still present:
This option is experimental and does not currently guarantee to
disable all GCC optimizations that are affected by rounding mode.
This is still true. GCC did not before the patch, did not after the patch
and does not now fully support disabling optimizations that are unsafe in
the presence of rounding mode changes; a few affected optimizations are
disabled, but noone has seriously attempted to cover them all. GCC was
"unsafe" before the patch and remains so whether or not you use the
> I am tired of waiting for a solution in GCC,
There are plenty of bug reports for floating-point issues, and a lack of
volunteers fixing them, so perhaps you should not expect filing more bugs
to help, but "waiting for a solution" isn't listed there at all.
> Somehow, I also think that this -fno-rounding-math default is
> inconsistent with the general policy of defaults in GCC which
> is to aim at safety and correctness first.
The default is in accordance with standard requirements, and more more
conservative than other compilers which tend to enable their -ffast-math
equivalents by default rather than just -fno-rounding-math.
Joseph S. Myers