From: Christian Heimes Date: Sun, 23 Sep 2012 14:15:01 +0000 (+0200) Subject: GCC doesn't support typeof in strict ansi mode (e.g. -ansi or -std=c89) X-Git-Tag: v3.3.1rc1~818^2^2~46 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=fd0ddab97ba458ef00deab9ff846ca11c510f4e1;p=python GCC doesn't support typeof in strict ansi mode (e.g. -ansi or -std=c89) --- diff --git a/Include/pymacro.h b/Include/pymacro.h index ce1cbefb73..52e8ee3a28 100644 --- a/Include/pymacro.h +++ b/Include/pymacro.h @@ -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) \