4.5.3. __attribute__((aligned))

The aligned variable attribute specifies a minimum alignment for the variable or structure field, measured in bytes.

Note

This variable attribute is a GNU compiler extension that is supported by the ARM compiler.

Example

int Variable_Attributes_aligned_0 __attribute__ ((aligned (16)));
/* aligned on 16 byte boundary */
short Variable_Attributes_aligned_1[3] __attribute__ ((aligned));
/* aligns on 4 byte boundary for ARM */

See also

Copyright © 2007, 2010 ARM Limited. All rights reserved.ARM DUI 0348A
Non-Confidential