DATA_ALIGNMENT vs. DECL_USER_ALIGNMENT

Robert Dewar dewar@gnat.com
Thu Apr 10 21:29:00 GMT 2003


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



More information about the Gcc mailing list