> -----Original Message----- > From: Joseph S. Myers > On Thu, 6 Mar 2014, Ian Bolton wrote: > > > I see in common.opt that fp-contract=fast is the default for GCC. > > > > But then it gets disabled in c-family/c-opts.c if you are using ISO C > > (e.g. with -std=c99). > > > > But surely if you have also specified -funsafe-math-optimizations > then > > it should flip it back onto fast? > > That seems reasonable. >
Thanks for the feedback, Joseph. I've been working on the patch, but I see in gcc/opts.c that there is a definite distinction between set_fast_math_flags and set_unsafe_math_optimizations_flags. I'm thinking this is more of a fast-math thing than an unsafe_math_optimizations thing, so I should actually be adding it in set_fast_math_flags. Is this correct? Whilst I'm on, I think I found a bug in the Optimize-Options documentation ... It says that -ffast-math is enabled by -Ofast and that -ffast-math enabled -funsafe-math-optimizations. But the definition of -funsafe-math-optimizations says it is not turned on by any -O option. I think it should say that it is turned on by -Ofast (via -ffast-math), just for clarity and consistency. Does that make sense? Many thanks, Ian > -- > Joseph S. Myers > jos...@codesourcery.com