Reputation: 21
The Intel compiler appears to accept the -fno-strict-aliasing flag verbatim, but I have not seen that behavior documented anywhere, and the flag may be ignored. Flags such as -no-ansi-alias look related, but I want to be sure I specify exactly the right behavior.
(Reminder: this question is about ICC-classic, not LLVM-based ICX.)
Upvotes: 2
Views: 1353
Reputation: 620
When these replies were posted, Intel compilers did in fact default to -fno-ansi-alias, but it has since changed (at least for linux).
Upvotes: 2
Reputation: 212929
ICC accepts most gcc switches and does the right thing with them. If you want to use the ICC-specific switch though then I think this is probably the one:
-[no-]ansi-alias
enable/disable(DEFAULT) use of ANSI aliasing rules optimizations;
user asserts that the program adheres to these rules
Upvotes: 3