floating point optimization by function

Simon West simon.west@cantab.net
Wed May 4 23:50:00 GMT 2011


Hello,

Could anyone tell me if there is a GCC equivalent of the pragmas used
to control floating point arithmetic on a function-by-function basis
in Microsoft Visual C++? (the pragmas are described here:
http://msdn.microsoft.com/en-us/library/aa289157%28v=vs.71%29.aspx#floapoint_topic7
)

Specifically, I have a function for which I need to guarantee that no
associative arithmetic optimizations are performed, i.e., I need to force
-fno-associative-math to be used, but only around this particular function.

Thanks for your help,
Simon.



More information about the Gcc-help mailing list