man gcc(1) says: the option -ffast-math causes the preprocessor macro __FAST_MATH__ to be defined. Is there any further documentation of that macro?
I would expect that code like
#define __FAST_MATH__ blabla
y = pow(x,a);
#undef __FAST_MATH__
allows control of math optimization, fine grained down to single statements.
However, my tests rather indicate that
#define __FAST_MATH__
#define __FAST_MATH__ on
are all ignored, regardless where they are placed.
[EDIT] They are ignored even if they are placed before
#include <math.h>
"Ignored" means: have no measurable effect. Whereas -ffast-math accelerates my test code by a factor of 3.