Everything

-pack


< Compile Options / Microcontroller Options >

[Format]

-pack

 

-

[Default]

The boundary alignment value for structures and classes equals the maximum boundary alignment value for members.

[Description]

-

This option specifies the boundary alignment value for structure members and class members.

-

The boundary alignment value for structure members can also be specified by the #pragma pack extension. If both this option and a #pragma extension are specified, the #pragma specification takes priority. The boundary alignment value for structures and classes equals the maximum boundary alignment value for members.

[Remarks]

-

The boundary alignment values for structure members and class members when these options are specified are shown in the following table.

Table 2.7

Boundary Alignment Values for Structure Members and Class Members When the pack Option is Specified

Member Type

pack

Not Specified

(signed) char

1

1

(unsigned) short

1

2

(unsigned) intNote, (unsigned) long, (unsigned) long long, floating type, and pointer type

1

4

Note

Becomes the same as short when the int_to_short option is specified.