[PATCH]: Use -frounding-math for builtins that care about rounding

Richard Guenther richard.guenther@gmail.com
Sat Mar 3 16:59:00 GMT 2007


On 3/3/07, Kaveh R. GHAZI <ghazi@caip.rutgers.edu> wrote:
> Long ago, we setup builtin attributes on all the c math functions.  One of
> the things we had to be mindful of was whether the math function was
> affected by rounding mode.  If it was, we used -funsafe-math-optimizations
> as a proxy to determine whether the rounding mode mattered to the user.
> http://gcc.gnu.org/ml/gcc-patches/2002-07/msg00232.html
>
> Some time after that, we created a specific flag -frounding-math for this.
> http://gcc.gnu.org/ml/gcc-patches/2003-09/msg00104.html
>
> The patch below changes the macro in builtins.def to honor that more
> specific flag instead of -funsafe-math-optimizations.
>
> Tested on sparc-sun-solaris2.10, no regressions.
>
> Okay for mainline?

This is ok.

Thanks,
Richard.

>
> 2007-03-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
>
>         * builtins.def (ATTR_MATHFN_FPROUNDING): Rely on
>         flag_rounding_math, not flag_unsafe_math_optimizations.



More information about the Gcc-patches mailing list