[issue14085] PyUnicode_WRITE: "comparison is always true" warnings

2012-03-03 Thread Roundup Robot
Roundup Robot added the comment: New changeset ba0bd949ddf5 by Victor Stinner in branch 'default': Close #14085: remove assertions from PyUnicode_WRITE macro http://hg.python.org/cpython/rev/ba0bd949ddf5 -- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: op

[issue14085] PyUnicode_WRITE: "comparison is always true" warnings

2012-02-26 Thread STINNER Victor
STINNER Victor added the comment: Castng to Py_UCS4 doesn't make the warning quiet. Does someone know how to make the warning quiet. If not, assertions can be removed from PyUnicode_WRITE. We might write a function for Python compiled in debug mode to add the assertions. More consistency tests

[issue14085] PyUnicode_WRITE: "comparison is always true" warnings

2012-02-26 Thread Florent Xicluna
Changes by Florent Xicluna : -- assignee: ronaldoussoren -> ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: ht

[issue14085] PyUnicode_WRITE: "comparison is always true" warnings

2012-02-26 Thread Florent Xicluna
Florent Xicluna added the comment: Same on OSX, building trunk (3.3.0a0) $ uname -v Darwin Kernel Version 10.8.0: Tue Jun 7 16:32:41 PDT 2011; root:xnu-1504.15.3~1/RELEASE_X86_64 $ gcc --version i686-apple-darwin10-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5666) (dot 3) $ ./configure MACOSX_D

[issue14085] PyUnicode_WRITE: "comparison is always true" warnings

2012-02-22 Thread Stefan Krah
Stefan Krah added the comment: It looks like in the FreeBSD (patched?) gcc version -Wtype-limits is part of -Wall. I can reproduce the same warnings on Ubuntu with: ./configure --with-pydebug CFLAGS=-Wtype-limits So I'm not so sure anymore if this is worth a patch at all. I could also expor

[issue14085] PyUnicode_WRITE: "comparison is always true" warnings

2012-02-22 Thread Stefan Krah
Stefan Krah added the comment: Your suggestion eliminates many warnings, but not all. FreeBSD is still stuck with gcc-4.2, so perhaps this is a good compromise. Getting rid of the remaining warnings might require a more bloated solution. These are the remaining warnings: Objects/unicodeobjec

[issue14085] PyUnicode_WRITE: "comparison is always true" warnings

2012-02-22 Thread STINNER Victor
STINNER Victor added the comment: Can you try to cast value to Py_UCS4 in assertions of PyUnicode_WRITE() macro? For example, replace assert(value <= 0xff); by assert((Py_UCS4)value <= 0xff); -- ___ Python tracker

[issue14085] PyUnicode_WRITE: "comparison is always true" warnings

2012-02-22 Thread Stefan Krah
New submission from Stefan Krah : The FreeBSD-9.0 bot shows a couple of warnings because some comparisons in PyUnicode_WRITE are always true: Objects/unicodeobject.c:2598: warning: comparison is always true due to limited range of data type Objects/unicodeobject.c:2598: warning: comparison is a