You copied the Doc URL to your clipboard.

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.

Was this page helpful? Yes No