This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/34678] Optimization generates incorrect code with -frounding-math option (#pragma STDC FENV_ACCESS not implemented)
- From: "vincent at vinc17 dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 15 Oct 2008 22:33:53 -0000
- Subject: [Bug middle-end/34678] Optimization generates incorrect code with -frounding-math option (#pragma STDC FENV_ACCESS not implemented)
- References: <bug-34678-5307@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #11 from vincent at vinc17 dot org 2008-10-15 22:33 -------
(In reply to comment #10)
> The default of -fno-rounding-math is chosen with the reason that this is what
> a compiler can assume if #pragma STDC FENV_ACCESS is not turned on.
The C standard doesn't require a compiler to recognize the FENV_ACCESS pragma,
but if the compiler does not recognize it, then it must assume that this pragma
is ON (otherwise the generated code can be incorrect). That's why I suggested
that -frounding-math should be the default.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34678