How large are arbitrarily large integers? (Was Re: Bitfield subtlety)

Niels Möller nisse at
Thu Mar 29 09:27:24 UTC 2018

Richard Biener <rguenther at> writes:

> I would be surprised if that wouldn't work everywhere - any reason
> you have doubts?  To clarify, allocation would work like
>  void *ptr = malloc (... + sizeof (size_t));
>  ->_mp_d = (char *)ptr + sizeof (size_t);
>  size_t *size = ptr;

That would give bad alignment in the case that limbs are 64 bits but
size_t only 32 bits (and the x86_64 "x32" abi is something like that,


Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677.
Internet email is subject to wholesale government surveillance.

More information about the gmp-devel mailing list