Hello,

the -ffast-math command line option sets a bunch of other flags
internally, as implemented in set_fast_math_flags.  It is possible
to selectively override those flags on the command line as well.

I'm now wondering under what circumstances the __FAST_MATH__ macro
should still be defined.  This is currently implemented in the
fast_math_flags_set_p routine, which checks the status of *some*
(but not all!) of the flags implied by -ffast-math.

This has the effect that e.g. after

  -ffast-math -fno-finite-math-only

the __FAST_MATH__ macro is no longer predefined, but after

  -ffast-math -fno-associative-math

the __FAST_MATH__ macro still *is* predefined, even though both
-ffinite-math-only and -fassociative-math are implied by -ffast-math.

Is this deliberate?  (If so, is it documented somewhere?)

Or is this just a bug and fast_math_flags_set_p ought to check
all flags implied by -ffast-math?

Bye,
Ulrich

-- 
  Dr. Ulrich Weigand
  GNU/Linux compilers and toolchain
  ulrich.weig...@de.ibm.com

Reply via email to