This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: DATA_ALIGNMENT vs. DECL_USER_ALIGNMENT
- From: dewar at gnat dot com (Robert Dewar)
- To: geoffk at geoffk dot org, weigand at immd1 dot informatik dot uni-erlangen dot de
- Cc: gcc-patches at gcc dot gnu dot org, gcc at gcc dot gnu dot org,kenner at vlsi1 dot ultra dot nyu dot edu
- Date: Thu, 10 Apr 2003 16:45:29 -0400 (EDT)
- Subject: Re: DATA_ALIGNMENT vs. DECL_USER_ALIGNMENT
> I'm not sure whether this is the preferred fix; in particular
> I don't understand why those variables need to have forced
> alignment in the first place ...
The Ada semantics is that they must have the indicated alignment. It is
of course always fine to give a larger alignment that is a multiple of
the requested alignment (it's just a special case of meeting the alignment
requirement).
We are discussing now exactly what the relation between the Ada semantics
and the gcc semantics for alignment.
Right now, it looks like the alignment should be forced for subtypes and
not forced for objects, and that is correct provided that objects are always
given an alignment at least as large as that of the subtype.