Skip to content

Commit fd0ddab

Browse files
committed
GCC doesn't support typeof in strict ansi mode (e.g. -ansi or -std=c89)
1 parent 3b9493b commit fd0ddab

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Include/pymacro.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
error (see Py_BUILD_ASSERT_EXPR).
3131
3232
Written by Rusty Russell, public domain, http://ccodearchive.net/ */
33-
#if defined(__GNUC__)
33+
#if (defined(__GNUC__) && !defined(__STRICT_ANSI__))
3434
/* Two gcc extensions.
3535
&a[0] degrades to a pointer: a different type from an array */
3636
#define Py_ARRAY_LENGTH(array) \

0 commit comments

Comments
 (0)