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: Geoff Keating <geoffk at geoffk dot org>
- To: kenner at vlsi1 dot ultra dot nyu dot edu (Richard Kenner)
- Cc: gcc-patches at gcc dot gnu dot org, gcc at gcc dot gnu dot org
- Date: 10 Apr 2003 14:31:05 -0700
- Subject: Re: DATA_ALIGNMENT vs. DECL_USER_ALIGNMENT
- References: <10304102056.AA02451@vlsi1.ultra.nyu.edu>
kenner at vlsi1 dot ultra dot nyu dot edu (Richard Kenner) writes:
> Is it not true in Ada that if something is a particular type, then
> it has the properties (including alignment) of that type?
>
> 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.
So, what you actually want to do is to set the alignment of the object
to be *more* aligned than its type? Or, to phrase it another way, you
want the object to be of a type which is more aligned than its
declared type?
--
- Geoffrey Keating <geoffk at geoffk dot org>