Help stabilising mini-gmp

Torbjörn Granlund tg at
Fri Nov 25 16:17:39 UTC 2016

Marc Glisse <marc.glisse at> writes:

  Fixed. It was unhappy about (-13) << 2. I am a bit surprised it
  doesn't complain about (-13) >> 2 on the next line, we'll see if it
  ever becomes an issue.

This must be a compiler problem.  At least in C, shifting negative
integers is undefined.  It is a pity that it is, but the standard say

I am less sure about C++.  Some googling did not provide a definitive

But if left shift of negative integers is undefined, surely right shift
is too!

Please encrypt, key id 0xC8601622

More information about the gmp-devel mailing list