Non-Confidential | ![]() | DUI0774J | ||
| ||||
Home > Compiler Command-line Options > -fstrict-aliasing, -fno-strict-aliasing |
Instructs the compiler to apply the strictest aliasing rules available.
-fstrict-aliasing
is implicitly
enabled at -O1
or higher. It is disabled at -O0
, or when no optimization level is specified.
When optimizing at -O1
or higher,
this option can be disabled with -fno-strict-aliasing
.
-fstrict-aliasing
on
the command-line has no effect, since it is either implicitly enabled, or
automatically disabled, depending on the optimization level that is used.In the following example, -fstrict-aliasing
is enabled:
armclang --target=aarch64-arm-none-eabi -O2 -c hello.c
In the following example, -fstrict-aliasing
is disabled:
armclang --target=aarch64-arm-none-eabi -O2 -fno-strict-aliasing -c hello.c
In the following example, -fstrict-aliasing
is disabled:
armclang --target=aarch64-arm-none-eabi -c hello.c