From: Victor Stinner Date: Mon, 16 Dec 2024 17:17:01 +0000 (+0100) Subject: [3.13] gh-127906: Fix Py_BUILD_ASSERT_EXPR() on Windows (#127994) X-Git-Tag: v3.13.2~193 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8e143b2886c7ccef1b18c10d28d16b2358dd6636;p=thirdparty%2FPython%2Fcpython.git [3.13] gh-127906: Fix Py_BUILD_ASSERT_EXPR() on Windows (#127994) gh-127906: Fix Py_BUILD_ASSERT_EXPR() on Windows Change Py_BUILD_ASSERT_EXPR implementation on Windows to avoid a compiler warning about an unnamed structure. --- diff --git a/Include/pymacro.h b/Include/pymacro.h index e3e9cd135948..e0378f9d27a0 100644 --- a/Include/pymacro.h +++ b/Include/pymacro.h @@ -47,7 +47,7 @@ #define Py_CHARMASK(c) ((unsigned char)((c) & 0xff)) #if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L \ - && !defined(__cplusplus)) + && !defined(__cplusplus) && !defined(_MSC_VER)) # define Py_BUILD_ASSERT_EXPR(cond) \ ((void)sizeof(struct { int dummy; _Static_assert(cond, #cond); }), \ 0)