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


> 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 ...


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