How to supress a specific kind of ansi-aliasing rules?
Bokhanko, Andrey S
andrey.s.bokhanko@intel.com
Wed Jun 20 13:40:00 GMT 2007
> Structural analysis let's you prove that stores to fields m1 and m2
may
> never overlap. They're always at different offsets, even if p1 and p2
> point to the same area.
Yes, but one can write something like this:
p2 = (S1 *)&p1->s1_m2;
Of course, this is a blatant violation of ANSI C standard, etc. Still, a
perfectly acceptable C code.
With violations of other ANSI aliasing rules, one has an exit:
-fno-strict-aliasing option. No so in this case.
Or is it?
Yours,
Andrey
More information about the Gcc
mailing list