Mark Dickinson <dicki...@gmail.com> added the comment:

> I can't say anything about the standard, but p > q looks like it should
> be the same as (p - q) > 0

Yep.

> which looks rather well-defined for pointers.

Nope.  It's only well-defined for pointers pointing into the same array (or to 
one past the end of an array).  Otherwise it's undefined behaviour.

See section 6.5.6, paragraph 9, of

http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1256.pdf

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue10044>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to