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. You can specify a value up to a maximum of 1048576 bytes. If you omit the alignment factor, and its enclosing parentheses, the compiler automatically uses 16 bytes. If you specify an alignment factor greater than the maximum, the attribute specification is ignored, and the compiler simply uses the default alignment in effect.
When you apply the aligned attribute to a bit field structure member variable, 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 ;