diff options
author | Jeff Epler <jepler@unpythonic.net> | 2025-09-27 19:29:49 -0500 |
---|---|---|
committer | Damien George <damien@micropython.org> | 2025-10-04 15:51:23 +1000 |
commit | 33cf1ab3ccabecd156176ceebcd56332e8a5d325 (patch) | |
tree | 1175c45a7f19441cb258c6e73426b03088154368 | |
parent | 099991f3ef4a21f5bdd00767e68e7cad9ce925e4 (diff) |
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 <jepler@unpythonic.net>
-rw-r--r-- | py/misc.h | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -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 |