This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
RE: How to supress a specific kind of ansi-aliasing rules?
> 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