This is the mail archive of the gcc-patches@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: alias.c:nonoverlapping_component_refs_p




On Mon, 3 Dec 2001, Richard Kenner wrote:

>     > I don't believe it is safe to conclude that if two fields aren't the
>     > same, they don't overlap.  An example of a case where they do is an Ada
>     > subtype of a variant record.
>
>     On a RECORD_TYPE, it should be safe.
>
> No, the example I just gave will be a RECORD_TYPE.
...
>
>     If Ada has different semantics, it needs a different tree code, or some
>     easy way to differentiate.
>
> I'm sorry, I'm missing your point.  Where in tree.def does it say that fields
> may not overlap?
>
The part that says RECORD_TYPE represents a c struct or a pascal record.
If Ada's semantics are significantly different, then it shouldn't be using
that tree code, or should be differentiable in a way that allows for us to
simply say "Oh, it's an ada subtype of a variant record, we can't assume
if two fields arent the same, they don't overlap".
Because as far as I know, in C, this is a valid assumption.

Of course, it's early, i could be wrong.

--Dan


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