Report: gmp-6.1.2 on MacOS 10.15 using GCC and two Clang

Hans Åberg haberg-1 at
Sun Oct 20 21:17:37 UTC 2019

> On 20 Oct 2019, at 22:14, Torbjörn Granlund <tg at> wrote:
> Hans Åberg <haberg-1 at> writes:
>> I believe we assume signed integers are in two's complement.
>  Strictly, it is for signed overflows one cannot assume modulo 2^n, n =
>  number of bits. For the unsigned integer types it is required,
>  though.
> Believe it or not, but the GMP devs are pretty good at computer
> arithmetic.

Sorry for offending you: My response was to the part you snipped, which you did not detail. And on the Bison list a very savvy C programmer suggested the rule was one’s complement legacy, apparently not realizing modern optimization use.

More information about the gmp-bugs mailing list