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, kenner at vlsi1 dot ultra dot nyu dot edu
- Cc: gcc-patches at gcc dot gnu dot org, gcc at gcc dot gnu dot org
- Date: Thu, 10 Apr 2003 17:10:25 -0400 (EDT)
- Subject: Re: DATA_ALIGNMENT vs. DECL_USER_ALIGNMENT
> This is the terminology point that Robert alluded to. If something
> has an alignment of 64 bits, it *also* has an alignment of 32 bits and
> of 16 bits, etc. So an object that is aligned to 64 bits and is of a
> type that is aligned to 32 bits *has* "the properties (including
> alignment)" of its type.
It's not just that. It would also be fine to have
type x is record ....
for x'alignment use 2;
xx : x;
Put_Line (Integer'Image (XX'Alignment));
output a value of 4 or 8 or ...