[Bug tree-optimization/35202] [4.1/4.2/4.3 Regression] exp->expf transformation incorrect with -fmath-errno

rguenth at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Thu Feb 14 23:02:00 GMT 2008



------- Comment #1 from rguenth at gcc dot gnu dot org  2008-02-14 23:01 -------
There are more problems with -ferrno-math, see also PR29887.  It is btw unclear
to me whether -ferrno-math is supposed to preserve errno handling of whatever
the underlying libm provides or if it should actively do errno handling for
errors required by the standard or also for those that are optional by
the standard.  That is specifically how this option relates to 7.12.1,
especially if -ferrno-math effectively constrains the value of math_errhandling
or makes GCC assume a certain value of it.

Also what the effects of -ferrno-math are on the subtle difference of
"a ... error occurs" and "a ... error may occur".

Clarification would be much appreciated here, and I would like to effectively
make our default (-ferrno-math -ftrapping-math) be changed to
-fno-errno-math -ftrapping-math and providing math_errhandling ==
MATH_ERREXCEPT
by GCC, overriding the library.

Actually 7.12.1 does not say that errno is untouched if math_errhandling ==
MATH_ERREXCEPT, or does it do so implicitly?

Yet another reason why separating the math runtime from GCC is bad :(


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |rguenth at gcc dot gnu dot
                   |                            |org
           Keywords|                            |wrong-code


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



More information about the Gcc-bugs mailing list