IBM extension

The __align type qualifier

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:

Read syntax diagramSkip visual syntax diagram__align qualifier syntax for simple variables
 
>>-type specifier--__align--(--int_constant--)--declarator-----><
 

Read syntax diagramSkip visual syntax diagram__align qualifier syntax for structures or unions
 
>>-__align--(--int_constant--)--+-struct-+---------------------->
                                '-union--'
 
>--+----------------+--{--member_declaration_list--}--;--------><
   '-tag_identifier-'
 

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:



[ Top of Page | Previous Page | Next Page | Contents | Index ]