Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.
7956 Discussions

seeking exact equivalent to gcc's -fno-strict-aliasing flag for icc

humble_student
Beginner
547 Views
I am compiling a Python/Cython/C project with Intel's compiler, and I need to find an icc option that is _exactly_ equivalent to gcc's -fno-strict-aliasing flag. It appears that icc accepts -fno-strict-aliasing directly, but this behavior is not documented in the "Portability Options" section of the manual, so I am not sure whether the flag is simply being silently ignored. It appears that icc's -no-ansi-alias flag is related to gcc's -fno-strict-aliasing flag, but I would like definitive confirmation either that icc correctly accepts -fno-strict aliasing or that -no-ansi-alias is an exact substitute. Thanks.
0 Kudos
2 Replies
Om_S_Intel
Employee
547 Views

The icc acepts correctly -fno-strict-aliasing.

0 Kudos
TimP
Honored Contributor III
547 Views
icc default option -no-ansi-alias is equivalent to gcc -no-strict-aliasing. Remember that an application which depends on this is in violation of C and C++ standards and many optimizations will be disabled.
0 Kudos
Reply