This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: DATA_ALIGNMENT vs. DECL_USER_ALIGNMENT
- From: kenner at vlsi1 dot ultra dot nyu dot edu (Richard Kenner)
- To: aoliva at redhat dot com
- Cc: gcc-patches at gcc dot gnu dot org, gcc at gcc dot gnu dot org
- Date: Tue, 22 Apr 03 21:11:34 EDT
- Subject: Re: DATA_ALIGNMENT vs. DECL_USER_ALIGNMENT
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*.