aligned variable attribute syntax >>-__attribute__------------------------------------------------> >--((--+-aligned-----+--+------------------------+--))--------->< '-__aligned__-' '-(--alignment_factor--)-'The alignment_factor is the number of bytes, specified as a constant expression that evaluates to a positive power of 2. On the z/OS® platform, the maximum supported value is 8 bytes in 32-bit mode, and 16 bytes in 64-bit mode. If you omit the alignment factor (and its enclosing parentheses), the compiler automatically uses the platform maximum. If you specify an alignment factor greater than the maximum, the compiler uses the default alignment in effect and ignores your specification.
When you apply the aligned attribute to a member variable in a bit field structure, the attribute specification is applied to the bit field container. If the default alignment of the container is greater than the alignment factor, the default alignment is used.
struct address {
int street_no;
char *street_name;
char *city;
char *prov;
char *postal_code;
} first_address __attribute__((__aligned__(16))) ;
struct address second_address __attribute__((__aligned__(16))) ;
struct address {
int street_no;
char *street_name;
char *city;
char *prov __attribute__((__aligned__(16))) ;
char *postal_code __attribute__((__aligned__(16))) ;
} first_address ;