On Saturday 08 December 2007 02:23, John Reiser wrote:
> > they treat
> > the words as signed, do a subtraction, the result is treated as signed,
> > and the result is checked for < 0 or > 0.
>
> If the subtraction overflows then it is incorrect to compare the "result"
> (while forgetting about the Carry) to 0.

Hmm, yes.  Wasn't there a giant storm in a teacup on the gcc list a while
back about whether gcc should optimise on the basis that overflow of signed
arithmetic is undefined?

J

-------------------------------------------------------------------------
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Valgrind-developers mailing list
Valgrind-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/valgrind-developers

Reply via email to