Message385707
[forwarded from https://bugs.debian.org/961396]
$ cat > foo.c
#include <Python.h>
int main(int argc, char *argv[])
{
Py_UNICODE x = 0;
return Py_UNICODE_ISSPACE(x);
}
$ gcc -Wsign-compare -Werror $(pkg-config --cflags python3) foo.c
In file included from /usr/include/python3.9/unicodeobject.h:1026,
from /usr/include/python3.9/Python.h:97,
from foo.c:1:
foo.c: In function ‘main’:
/usr/include/python3.9/cpython/unicodeobject.h:25:11: error: comparison of integer expressions of different signedness: ‘Py_UNICODE’ {aka ‘int’} and ‘unsigned int’ [-Werror=sign-compare]
25 | ((ch) < 128U ? _Py_ascii_whitespace[(ch)] : _PyUnicode_IsWhitespace(ch))
| ^
foo.c:7:16: note: in expansion of macro ‘Py_UNICODE_ISSPACE’
7 | return Py_UNICODE_ISSPACE(x);
| ^~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors |
|
Date |
User |
Action |
Args |
2021-01-26 12:40:22 | doko | set | recipients:
+ doko |
2021-01-26 12:40:22 | doko | set | messageid: <1611664822.48.0.67078426677.issue43030@roundup.psfhosted.org> |
2021-01-26 12:40:22 | doko | link | issue43030 messages |
2021-01-26 12:40:21 | doko | create | |
|