From d652890f1aef5c1c3fc0ad23f95b3d9967a3ac5d Mon Sep 17 00:00:00 2001 From: Alexey Pavlov Date: Tue, 2 Sep 2025 18:18:51 +0300 Subject: [PATCH 140/N] GCC macro only available for C code --- Include/pymacro.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Include/pymacro.h b/Include/pymacro.h index e0378f9..53bd019 100644 --- a/Include/pymacro.h +++ b/Include/pymacro.h @@ -92,7 +92,7 @@ Written by Rusty Russell, public domain, http://ccodearchive.net/ Requires at GCC 3.1+ */ -#if (defined(__GNUC__) && !defined(__STRICT_ANSI__) && \ +#if (defined(__GNUC__) && !defined(__STRICT_ANSI__) && !defined(__cplusplus) && \ (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1)) || (__GNUC__ >= 4))) /* Two gcc extensions. &a[0] degrades to a pointer: a different type from an array */