> -ffast-math may not lead to reliable answers, but I have verified it to
> work with IEEE floating point verification for my main platform and gcc
> version and so I use it. It's not a viable choice as a default
I am not an expert on this, but as I understood, it depends on your *code*
whether this flag breaks it or not, as it violates strict ansi (or was it
ieee?) rules. I think eg it was about nans and stuff like that which won't
work anymore and the compiler trying to simplifiy things which could lead to
unwanted results due to float instability. Furthermore it would try to use
intrinsics for eg trig functions so your results could vary more from cpu to
cpu in constrast to using gcc internal functions.
> optimization flag. However, it does depend if any math errors result in
> any perceivable way for this project.
>
> -O2 is safe, just not very exciting. :P But a good default choice.
Great that you agree. :-) Omiting the frame pointer is also a viable choice,
but mainly helps x86 only due to lack of general registers. The only problem
I got with this flag was with some compilers on some arches (mainly k6-2)
segfaulting - but as this was at compile time only, so not a critical issue.
--
(°= =°)
//\ Prakash Punnoor /\\
V_/ \_V
|