[Bug c/41867] Translation time Floating Point precision is too small

jsm28 at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Sat Oct 31 18:37:00 GMT 2009



------- Comment #5 from jsm28 at gcc dot gnu dot org  2009-10-31 18:37 -------
323 covers all excess precision issues.  Predictable results that do
not depend on when a computation is carried out require
-fexcess-precision=standard which requires 4.5.  It so happens that all
C conformance options, including -std=c89, enable -fexcess-precision=standard;
although C90 does not define any standard binding to excess precision such
as C99 does with FLT_EVAL_METHOD, enabling it for C90 conformance seemed the
best compromise.

Options are documented in the GCC manual (specifically, invoke.texi
in the GCC sources).  The closest conformance options are
-std={c89,iso9899:199409,c99} -pedantic (or -pedantic-errors if you want
errors for constraint violations).  There are no known target-independent
conformance bugs in -std=c89 -pedantic or -std=iso9899:199409 -pedantic
(excess precision issues are target-dependent) in 4.5 (there are various
such bugs in 4.4).

http://gcc.gnu.org/onlinedocs/gcc/C-Dialect-Options.html
is the online version of the documentation for conformance options;
http://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html
includes the floating-point options and
http://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html
describes -pedantic.

There are no options to enable C99 conformance except for allowing decimal
floating point.  If you want -fdecimal-fp or similar to enable decimal
floating point in a strict conformance mode, that would be a separate issue.


*** This bug has been marked as a duplicate of 323 ***


-- 

jsm28 at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |DUPLICATE


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41867



More information about the Gcc-bugs mailing list