]> granicus.if.org Git - python/commitdiff
GCC doesn't support typeof in strict ansi mode (e.g. -ansi or -std=c89)
authorChristian Heimes <christian@cheimes.de>
Sun, 23 Sep 2012 14:15:01 +0000 (16:15 +0200)
committerChristian Heimes <christian@cheimes.de>
Sun, 23 Sep 2012 14:15:01 +0000 (16:15 +0200)
Include/pymacro.h

index ce1cbefb73e1baabb17dcc3ffcf365250b839b0f..52e8ee3a289d5ed7ce39821a9ed5cb4be3e0a2c7 100644 (file)
@@ -30,7 +30,7 @@
    error (see Py_BUILD_ASSERT_EXPR).
 
    Written by Rusty Russell, public domain, http://ccodearchive.net/ */
-#if defined(__GNUC__)
+#if (defined(__GNUC__) && !defined(__STRICT_ANSI__))
 /* Two gcc extensions.
    &a[0] degrades to a pointer: a different type from an array */
 #define Py_ARRAY_LENGTH(array) \