> Garrett Cooper wrote: > > With '-O2' and better, '-fstrict-aliasing' is the default in newer > versions of GCC, AFAIK, but people tend to switch it off because it > apparently breaks too many software packages. Or at least those whose > code base dates back to times where '-fno-strict-aliasing' was the default > and people got away with certain nasty coding hacks that no longer work > with '-fstrict-aliasing'. >
Well, -fno-strict-aliasing is pretty useful, especially if you want to do things with floating point. Not all code which requires -fno-strict-aliasing has "nasty coding hacks." As GCC says, the results are undefined when the flag is not passed. I have personally seen code that "looks" right but which results in very odd behavior with -O2, but works fine with any other optimization level. In situations like this, the flag is useful. Joe Damato _______________________________________________ [email protected] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"

