We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 991f307 commit 786c514Copy full SHA for 786c514
Include/pymacro.h
@@ -151,6 +151,8 @@
151
#define _Py_RVALUE(EXPR) ((void)0, (EXPR))
152
153
// Return non-zero if the type is signed, return zero if it's unsigned.
154
-#define _Py_IS_TYPE_SIGNED(type) ((type)(-1) < 0)
+// Use "<= 0" rather than "< 0" to prevent the compiler warning:
155
+// "comparison of unsigned expression in '< 0' is always false".
156
+#define _Py_IS_TYPE_SIGNED(type) ((type)(-1) <= 0)
157
158
#endif /* Py_PYMACRO_H */
0 commit comments