mirror of
https://github.com/micropython/micropython.git
synced 2025-12-16 09:50:15 +01:00
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>
This commit is contained in:
committed by
Damien George
parent
099991f3ef
commit
33cf1ab3cc
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user