Skip to main content

IAR Embedded Workbench for Arm 9.70.x

‑‑no_const_align

In this section:
Syntax

‑‑no_const_align

Description

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

For example, a string literal will get alignment 1, because it is an array with elements of the type const char which has alignment 1. Using this option might save ROM space, possibly at the expense of processing speed.

See also

Alignment.

Caution

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