This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: DATA_ALIGNMENT vs. DECL_USER_ALIGNMENT


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>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]