[PATCH] VEC and tree aliasing
Nathan Sidwell
nathan@codesourcery.com
Tue Apr 26 08:54:00 GMT 2005
Richard Kenner wrote:
> 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?
self consistent. i.e. the above mentioned mismatch
nathan
--
Nathan Sidwell :: http://www.codesourcery.com :: CodeSourcery LLC
nathan@codesourcery.com :: http://www.planetfall.pwp.blueyonder.co.uk
More information about the Gcc-patches
mailing list