This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]