[Python-checkins] cpython: GCC doesn't support typeof in strict ansi mode (e.g. -ansi or -std=c89)

georg.brandl python-checkins at python.org
Mon Sep 24 07:47:25 CEST 2012


http://hg.python.org/cpython/rev/a2bb835cac21
changeset:   79131:a2bb835cac21
user:        Christian Heimes <christian at cheimes.de>
date:        Sun Sep 23 16:15:01 2012 +0200
summary:
  GCC doesn't support typeof in strict ansi mode (e.g. -ansi or -std=c89)

files:
  Include/pymacro.h |  2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)


diff --git a/Include/pymacro.h b/Include/pymacro.h
--- 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) \

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list