This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: alias.c:nonoverlapping_component_refs_p
- From: kenner at vlsi1 dot ultra dot nyu dot edu (Richard Kenner)
- To: bernds at redhat dot com
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Mon, 3 Dec 01 10:16:03 EST
- Subject: Re: alias.c:nonoverlapping_component_refs_p
I would read the comment in tree.def as an implication that fields
don't overlap. I'm sure it was intended this way; otherwise, why have
a UNION_TYPE?
In a UNION_TYPE, not only do *all* fields overlap, but they all are at
bit position zero.
So the difference between a UNION_TYPE and a RECORD_TYPE is that the latter
allows some fields to not have position zero and allows some fields not to
overlap.