This option performs the structure packing.
[Specification format]
- | Interpretation when omitted |
The structure packing is not performed.
[Detailed description]
- | This option performs the structure packing. |
- | If this option is specified, struct members will not be aligned by their member types, but rather code will be generated with alignment packed to the specified num bytes. |
- | 1, 2, or 4 can be specified as num.
An error will occur if any other item is specified. |
- | This option can not be specified together with the -Xinline_strcpy option. |
- | If this option is specified when the structure packing is specified by the #pragma directive in the C source, the value specified by this option is applied to all structures until the first #pragma directive appears.
After that, the value of the #pragma directive is applied.
Even after the #pragma directive has appeared, however, the value specified by the option is applied if the default value is specified (if the value of the packing by the #pragma directive). |
[Example of use]
- | To generate code with struct member alignment packed to 1 byte, describe as: |
>ccrh -Xpack=1 -Xcommon=rh850 main.c
|