Compiler storage of data objects by natural byte alignment

By default, the compiler stores data objects by byte alignment as shown in Table 16.

Table 16. Compiler storage of data objects by byte alignment

TypeBytesAlignment
char, bool, _Bool.1Located at any byte address.
short, wchar_t.2Located at any address that is evenly divisible by 2.

float, int, long, pointer.

4Located at an address that is evenly divisible by 4.

long long, double, long double.

8Located at an address that is evenly divisible by 8.

Show/hideSee also

Copyright © 2010-2011 ARM. All rights reserved.ARM DUI 0472C
Non-ConfidentialID080411