This is the mail archive of the gcc@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: DATA_ALIGNMENT vs. DECL_USER_ALIGNMENT


    I hope not if this would change the layout of a structure containing a
    member with the specified alignment requirement.  This is where
    propagating the user-requested alignment for a type into the field
    decl comes into play: by doing this, we make sure the alignment
    request is obeyed, regardless of whether it comes from the field decl
    or from its type.

Yes, but this is precisely the case you have been asking to see: if you
set the alignment of a type, you do *not* want a field of the type to
be stricter aligned, but you don't care about an object.  You *do* care
about the object if you *also* specify an alignment for it, which is why
you must distinguish between the two cases.


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