This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author doko
Recipients doko
Date 2021-01-26.12:40:21
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1611664822.48.0.67078426677.issue43030@roundup.psfhosted.org>
In-reply-to
Content
[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
History
Date User Action Args
2021-01-26 12:40:22dokosetrecipients: + doko
2021-01-26 12:40:22dokosetmessageid: <1611664822.48.0.67078426677.issue43030@roundup.psfhosted.org>
2021-01-26 12:40:22dokolinkissue43030 messages
2021-01-26 12:40:21dokocreate