Visible to Intel only — GUID: GUID-1972B1CB-72C3-4BF7-ACE8-3F635A664231
Visible to Intel only — GUID: GUID-1972B1CB-72C3-4BF7-ACE8-3F635A664231
ansi-alias, Qansi-alias
Enables or disables the use of ANSI aliasing rules in optimizations.
Syntax
Linux: |
-ansi-alias -no-ansi-alias |
macOS: |
-ansi-alias -no-ansi-alias |
Windows: |
/Qansi-alias /Qansi-alias- |
Arguments
None
Default
Windows* systems: /Qansi-alias- |
ANSI aliasing rules are disabled in optimizations. |
Linux* and macOS systems: -ansi-alias |
ANSI aliasing rules are enabled in optimizations. |
Description
This option tells the compiler to assume that the program adheres to ISO C Standard aliasability rules.
If your program adheres to the ANSI aliasability rules, this option allows the compiler to optimize more aggressively. If your program does not adhere to these rules, this option may cause the compiler to generate incorrect code.
If you are compiling on a Linux* or an macOS system and your program does not adhere to the ANSI aliasability rules, you can specify -no-ansi-alias to ensure program correctness.
When you specify the [Q]ansi-alias option, the ansi-alias checker is enabled by default. To disable the ansi-alias checker, you must specify -no-ansi-alias-check (Linux* and macOS) or /Qansi-alias-check- (Windows*).
IDE Equivalent
Visual Studio: Language > Enable Use of ANSI Aliasing Rules in Optimizations
Eclipse: Language > Enable Use of ANSI Aliasing Rules in Optimizations
Xcode: Language > Enable ANSI Aliasing
Alternate Options
Linux and macOS: -fstrict-aliasing
Windows: None