We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 802380d commit 2e1c616Copy full SHA for 2e1c616
py/misc.h
@@ -54,7 +54,7 @@ typedef unsigned int uint;
54
#define MP_STRINGIFY(x) MP_STRINGIFY_HELPER(x)
55
56
// Static assertion macro
57
-#if __cplusplus
+#if defined(__cplusplus)
58
#define MP_STATIC_ASSERT(cond) static_assert((cond), #cond)
59
#elif __GNUC__ >= 5 || __STDC_VERSION__ >= 201112L
60
#define MP_STATIC_ASSERT(cond) _Static_assert((cond), #cond)
@@ -70,7 +70,7 @@ typedef unsigned int uint;
70
#if defined(_MSC_VER) || defined(__cplusplus)
71
#define MP_STATIC_ASSERT_NONCONSTEXPR(cond) ((void)1)
72
#else
73
-#if __clang__
+#if defined(__clang__)
74
#pragma GCC diagnostic ignored "-Wgnu-folding-constant"
75
#endif
76
#define MP_STATIC_ASSERT_NONCONSTEXPR(cond) ((void)sizeof(char[1 - 2 * !(cond)]))
0 commit comments