Hans Åberg <haber...@telia.com> writes:

  A common programming error is assuming that signed integer types are
  two’s complement, because even though all current CPUs are that,
  overflows are undefined in C/C++, and an optimizer can take advantage
  of that. One example from [1]: checking overflows with x > x + 1 may
  work as intended with optimization turned off, but when on, the
  optimizer can assume that it is always false since x + 1 is undefined
  when overflowed.

I believe we assume signed integers are in two's complement.

We don't do a lot of arithmetic on signed integers, though.

-- 
Torbjörn
Please encrypt, key id 0xC8601622
_______________________________________________
gmp-bugs mailing list
gmp-bugs@gmplib.org
https://gmplib.org/mailman/listinfo/gmp-bugs

Reply via email to