[Bug target/47672] math-68881.h does not support C99

vincent.riviere at freesbee dot fr gcc-bugzilla@gcc.gnu.org
Mon Jun 6 19:06:00 GMT 2011


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

--- Comment #4 from Vincent Riviere <vincent.riviere at freesbee dot fr> 2011-06-06 19:06:07 UTC ---
Normal math implementation should always reside inside libm, to fully support 
exceptions, error handling, etc.

When better speed is required, and strict standard compliance is not required,
a user can compile his program with -ffast-math. As a result, any call to sin()
will be implemented by a single fsin instruction rather than a call to libm.
The purpose is the same as math-68881.h. But the implementation is different:
math-68881.h relies on the preprocessor, while -ffast-math is directly handled
by GCC at low level for better register usage, etc. This is why ideally
math-68881.h should be removed from GCC and -ffast-math always used by the
users, when needed. However, someone reported that all the functionnality of
math-68881.h was not reported to -ffast-math: some instructions are missing.

So I propose the following roadmap:

1) Commit my proposed patch, then close this bug. This will fix the current
math-68881.h for C99. I hit that problem when compiling libtiff.

2) Move the missing functionnality from math-68881.h to -ffast-math, then
remove math-68881.h from GCC.



More information about the Gcc-bugs mailing list