DATA_ALIGNMENT vs. DECL_USER_ALIGNMENT

Richard Kenner kenner@vlsi1.ultra.nyu.edu
Wed Apr 23 01:07:00 GMT 2003


    The point is that you're saying it could increase the alignment of an
    object in spite of a user-specified alignment for its type.  You can't
    tell whether the alignment was defined for interface, space or
    performance, so a user-specified alignment for a type should be
    obeyed.

As has been discussed, "obeyed" means very different things for types
and objects.  For types, you must not treat the type as being more
aligned.  For objects, a more-aligned object is *also* less aligned, so
aligning an object more than that of its type is "obeying" the alignment
of the type.  And we know there are cases (such as minimum alignment on
S390) where you *must* increase the alignment of an object from that of
its type.

So the question is when to supress the an optional increase for
objects and I claim the only time should be if there is an alignment
specified *for a particular object*.



More information about the Gcc-patches mailing list