-fno-strict-aliasing in CWARNFLAGS?
Michel Dänzer
michel at daenzer.net
Wed Feb 3 03:11:59 PST 2010
On Wed, 2010-02-03 at 10:15 +0000, Colin Harrison wrote:
>
> Michel Dänzer wrote:
>
> > Traditionally, -fno-strict-aliasing was definitely necessary for the X
> > server and/or some drivers to work correctly.
>
> Strict aliasing used to be a can'o worms...
>
> http://lkml.org/lkml/2003/2/26/158
>
> and last time I tried strict aliasing for Xming (many moons ago) I fell flat
> on my face.
>
> But is series 4 gcc now much better?
Problems with strict aliasing are usually due to strict aliasing
violations in the code being compiled, not bugs in the compiler. So
newer compilers can't really help (in fact the opposite may be true, as
I think newer versions of gcc tend to obey strict aliasing even more
strictly), the only help would be fixing the code bugs. I'm sure some of
them have been fixed...
> We shall see (I'm testing with libX11 and libXt unchanged; but
> everything else ...most X.Org libs, most clients, pixman, Mesa and
> xserver... with strict aliasing)
> BTW I use -Os optimisation for all except -O2 for pixman and don't build any
> xserver drivers.
According to the gcc 4.3 documentation:
The `-fstrict-aliasing' option is enabled at levels `-O2', `-O3',
`-Os'.
--
Earthling Michel Dänzer | http://www.vmware.com
Libre software enthusiast | Debian, X and DRI developer
More information about the xorg-devel
mailing list