On 11/7/2010 1:37 AM, Segher Boessenkool wrote:
Is it because some programs out there don't care to be compliant and
want play trick with aliasings with -fno-strict-aliasing ?
Yes. Quite a lot of programs actually; largely not on purpose.
I thought it was done with the intent of making the code non-portable.
"it works on the only true compiler for the only true OS"
"that's the way everyone did it back in 1985"
That sounds weird since -fno-strict-aliasing seems to be enabled when no
optimisation levels have been passsed.
-fstrict-aliasing is enabled at -O2 and up, yes. I don't understand
what you find strange here?
At -O0, most optimizations where strict-aliasing would make a
difference, or violations might be discovered, are suppressed.
--
Tim Prince