From 33cf1ab3ccabecd156176ceebcd56332e8a5d325 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Sat, 27 Sep 2025 19:29:49 -0500 Subject: py/misc: Don't warn about a GNU extension for static assert macro. This warning was enabled by default on clang 17.0.0 on macOS 26. Disable it, because we want to make these checks at compile-time even if it requires an extension. Fixes issue #18116. Signed-off-by: Jeff Epler --- py/misc.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'py/misc.h') diff --git a/py/misc.h b/py/misc.h index ab40d3d98..67248ac2f 100644 --- a/py/misc.h +++ b/py/misc.h @@ -83,6 +83,9 @@ typedef unsigned int uint; #if defined(_MSC_VER) || defined(__cplusplus) #define MP_STATIC_ASSERT_NONCONSTEXPR(cond) ((void)1) #else +#if __clang__ +#pragma GCC diagnostic ignored "-Wgnu-folding-constant" +#endif #define MP_STATIC_ASSERT_NONCONSTEXPR(cond) ((void)sizeof(char[1 - 2 * !(cond)])) #endif -- cgit v1.2.3