The __align type qualifier
Beginning of IBM® Extension.
The __align qualifier is a language extension
that allows you to specify an explicit alignment for an aggregate
or a static (or global) variable. The specified byte boundary affects
the alignment of an aggregate as a whole, not that of its members.
The __align qualifier can be applied to an aggregate
definition nested within another aggregate definition, but not to
individual elements of an aggregate. The alignment specification is
ignored for parameters and automatic variables.
A declaration takes one of the following forms:
where int_constant is a positive integer value
indicating the byte-alignment boundary. The legal values are
1, 2, 4, 8,
or any other positive power of two.The following restrictions and limitations apply:
- The
__alignqualifier cannot be used where the size of the variable alignment is smaller than the size of the type alignment. - Not all alignments may be representable in an object file.
- The
__alignqualifier cannot be applied to the following:- Individual elements within an aggregate definition.
- Individual elements of an array.
- Variables of incomplete type.
- Aggregates declared but not defined.
- Other types of declarations or definitions, such as a typedef, a function, or an enumeration.
End of IBM Extension.
