Re: Is -fno-strict-aliasing still needed?

From: Horst von Brand (
Date: Tue Feb 11 2003 - 02:14:09 EST

Art Haas <> said:
> I ask because I've just built a kernel without using that flag -
> linus-2.5 BK from this morning, probably missing the 2.5.60 release by
> a few hours.

The problem with strict aliasing is that it allows the compiler to assume
that in:

     void somefunc(int *foo, int *bar)

foo and bar will _*never*_ point to the same memory area (at the same
struct, or into the same array, etc). There is no way to check for this in
the compiler in general (the function and the call might be in different
files, many functions are being called via pointers, ...).

That it did not bite you (yet, or perhaps you haven't noticed) doesn't mean
anything. Perhaps the compiler didn't make use of it (as of this version),
perhaps you did not hit a problem with optimized code (yet). Or perhaps the
kernel is clean WRT this. Your bet.

Dr. Horst H. von Brand                   User #22616
Departamento de Informatica                     Fono: +56 32 654431
Universidad Tecnica Federico Santa Maria              +56 32 654239
Casilla 110-V, Valparaiso, Chile                Fax:  +56 32 797513
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

This archive was generated by hypermail 2b29 : Sat Feb 15 2003 - 22:00:31 EST