Skip to main content

IAR Embedded Workbench for Arm 9.70.x

‑‑no_var_align

In this section:
Syntax
‑‑no_var_align
Description

By default, the compiler uses alignment 4 for variable objects with a size of 4 bytes or more. Use this option to make the compiler align variable objects based on the alignment of their type.

For example, a char array will get alignment 1, because its elements of the type char have alignment 1. Using this option might save RAM space, possibly at the expense of processing speed.

See also

Alignment and ‑‑no_const_align.

Caution

To set this option, use Project>Options>C/C++ Compiler>Extra Options.