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: [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?


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