Small limb-size in mini-gmp?

Marco Bodrato bodrato at
Tue Nov 12 21:22:00 UTC 2019

Il 2019-11-12 16:25 nisse at ha scritto:
> tg at (Torbjörn Granlund) writes:

>> so I'll wait until there is a defined method of
>> controlling its declaration.)

> Then we'd need something like
>   #ifndef MINI_GMP_LIMB_TYPE
>   #define MINI_GMP_LIMB_TYPE unsigned long
>   #endif
>   typedef MINI_GMP_LIMB_TYPE mp_limb_t
> in mini-gmp.h.

Seems clean and straightforward.

Is something like the following too tricky?

   #define MINI_GMP_LIMB_TYPE long

   typedef unsigned MINI_GMP_LIMB_TYPE mp_limb_t

As only unsigned types are supported...

Then, should we adapt the Makefile target check-mini-gmp in such a way 
that it can handle
   make MINI_GMP_LIMB_TYPE=char check-mini-gmp


More information about the gmp-devel mailing list