Skip to main content

IAR Embedded Workbench for RISC-V 3.40

‑‑allow_misaligned_data_access

In this section:
Syntax

‑‑allow_misaligned_data_access

Description

Use this option to make it possible to access misaligned data objects. The option can be used in conjunction with the #pragma pack directive for structs with misaligned members.

Typically, using this option is more efficient than a normal access to a packed structure. However, a misaligned access is slower than an aligned access.

See also

#pragma pack for more information about using the #pragma pack directive.

Caution

Project>Options>General Options>Code Generation>Allow misaligned data accesses