This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: detecting -ffast-math at compile time
Rohit Garg <rpg.314@gmail.com> writes:
> If I wish to detect if the compiler options include -ffast-math, which
> macro should I define? This is useful if I want to select which path
> of the code to compile depending on my needs with just a compiler
> switch. Eg. for SSE2, __SSE2__(or it's cousin) is defined.
Check for __FAST_MATH__.
The gcc manual documents this is in the description of -ffast-math.
Ian