The __align Specifier

Linux The __align keyword allows you to specify an explicit alignment for a data structure. The keyword is an orthogonal language extension intended to be used in the definition of an aggregate type or in the declaration of a first-level variable. The specified byte boundary affects the alignment of an aggregate as a whole, not that of its members. The __align specifier can be applied to an aggregate definition nested within another aggregate definition, but not to individual elements of an aggregate or class. The alignment specification is ignored for parameters and automatic variables.

A declaration takes one of the following forms:

>>-declarator--__align--(--int_constant--)--identifier--;------><
 
 

Structure or union syntax:

>>-__align--(--int_constant--)--struct_or_union_specifier--+-----+--{--struct_declaration_list--}--;-><
                                                           '-tag-'
 
 

where:

int_constant
Is a positive integer value indicating the byte-alignment boundary. The legal values are 1, 2, 4, 8, or 16.
struct_or_union_specifier
Is a structure or union specifier.
struct_declaration_list
Is a structure declaration list.
tag
Is a structure or union identifier.

Restrictions and limitations

The __align specifier 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 __align specifier cannot be applied to the following:

IBM Copyright 2003