[issue9586] "warning: comparison between pointer and integer" in multiprocessing build on Tiger
Mark Dickinson
report at bugs.python.org
Fri Aug 13 15:28:14 CEST 2010
Mark Dickinson <dickinsm at gmail.com> added the comment:
BTW, as far as I can tell from the standard (see e.g., section 6.5.9p2 of
www.open-std.org/jtc1/sc22/wg14/www/docs/n1256.pdf
), comparison between a pointer and an integer gives undefined behaviour, except in the case where the integer can be interpreted as a null pointer constant (which is not the case here). I'm assuming that the reason that gcc only gives a warning here rather than an error is that its general machinery can only tell that we're comparing an integer with a pointer, which *could* be valid C if that integer is 0.
So I do think this should be fixed, one way or another.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue9586>
_______________________________________
More information about the Python-bugs-list
mailing list