Limitation of the mpz_get_str function

Vincent Lefevre vincent at
Tue Feb 16 13:46:15 UTC 2021

On 2021-02-16 14:22:20 +0100, Christophe Clavier wrote:
> I suggest to modify the type of i to long int or to unsigned long int.

long or unsigned long may still be on 32 bits, e.g. under MS Windows.

I think that a more appropriate type in the context of a string
(or more generally an array of char) would be size_t.

Vincent Lefèvre <vincent at> - Web: <>
100% accessible validated (X)HTML - Blog: <>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)

More information about the gmp-bugs mailing list