[Developers] disable strict ansi support for c99 and the intel C compiler > 8

Frank Loeffler knarf at cct.lsu.edu
Fri Feb 13 09:59:59 CST 2009


this patch changes '-std=gnu99' to '-std=c99 -U__STRICT_ANSI__' for the
intel C compiler versions > 8.

'gnu99' was never officially supported and does not work as expected
starting with version 11. The official way to achieve c99 extensions
like M_PI is to undefine __STRICT_ANSI__ (which is turned on by
'-std=c99) [1]. This should then be equivalent to the -std=gnu99
option of the gnu c compiler.

This change should not be necessary for version 9, because this version
does not define __STRICT_ANSI__ for 'c99', but including version 9 here
keeps the patch smaller and the known-architecture file smaller and more
readable and it should work just as well.

http://www.intel.com/software/products/compilers/docs/clin/Release_Notes.htm :

Behavior Change for -std=c99 and -std=c89

When the -std=c99 or -std=c89 options are used, the 10.1 compiler's
behavior is now compatible with gcc and the __STRICT_ANSI__ macro is
predefined. If your application compiles with errors and you wish to use
the previous version's behavior, add -U__STRICT_ANSI__ to the command


Index: lib/make/known-architectures/linux
RCS file: /cactusdevcvs/Cactus/lib/make/known-architectures/linux,v
retrieving revision 1.132
diff -u -r1.132 linux
--- lib/make/known-architectures/linux	26 Jan 2009 20:53:27 -0000	1.132
+++ lib/make/known-architectures/linux	13 Feb 2009 15:49:32 -0000
@@ -380,7 +380,7 @@
       if test $icc_version -ge 8; then
-        icc_c99='-std=gnu99'
+        icc_c99='-std=c99 -U__STRICT_ANSI__'

--- StripMime Report -- processed MIME parts ---
  text/plain (text body -- kept)
  text/plain (text body -- kept)

More information about the Developers mailing list