On Thu, Apr 9, 2015 at 11:57 PM, Alain Ketterlin <al...@dpt-info.u-strasbg.fr> wrote: > Because, in: > > z = x+y; // all signed ints > if ( z < x ) > ... > > either there was no overflow (and the condition is false), or there was, > and the result is undefined, i.e., "z<x" can be considered false also.
Do you mean "all unsigned ints" here? Because if y is negative, the condition will be true without overflow. If you didn't, then I'm puzzled as to where the undefined behaviour is coming from. ChrisA -- https://mail.python.org/mailman/listinfo/python-list