This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] VEC and tree aliasing
- From: kenner at vlsi1 dot ultra dot nyu dot edu (Richard Kenner)
- To: nathan at codesourcery dot com
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Mon, 25 Apr 05 19:02:30 EDT
- Subject: Re: [PATCH] VEC and tree aliasing
The original code in push_fields_into_field_stack ignored the
bitpos_of_field for a FIELD_DECL that was the first thing on the
TYPE_FIELDS list.
Well, that's clearly wrong ...
but retains an assert to make sure the first field is always at offset
zero. That assertion is true for C, C++ and Java but I don't know
about other languages.
Well, it's not true for any language where the programmer is allowed to
specify explicit positions for fields. Ada is such and it also would be a
reasonable extension to C to allow an __attribute__ to do the same for it.
From what I understand, it doesn't matter if the first field is not at
offset zero, but it does matter that things are consistent!
Consistent with what?