Intel® C++ Compiler 15.0 for Linux Sets “-ansi-alias” by Default, Noncompliant Code May Fail

Beginning with version 15.0, the Intel® C++ Compiler for Linux enables -ansi-alias by default at optimization level 2 (-O2). The -ansi-alias option indicates that the code complies with ANSI aliasing rules.

If the application code adheres to ANSI aliasing rules, this change allows the compiler to make aggressive optimizations. The effect of this change on runtime performance depends on the application, the optimization methods supported by the compiler, and the compiler switches used.

If the application code does not follow ANSI aliasing rules, then this option may cause compile time or runtime failures. 

Use the –fno-ansi-alias option to disable this behavior. Note that -fstrict-aliasing has the same behavior as -ansi-alias, and -fno-strict-aliasing will negate both options as well. For more information, please refer to the User and Reference Guide for the Intel® C++ Compiler 15.0.

For more complete information about compiler optimizations, see our Optimization Notice.