Re: Small limb-size in mini-gmp?

2019-11-13 Thread Vincent Lefevre
On 2019-11-13 22:20:18 +0100, Niels Möller wrote: > t...@gmplib.org (Torbjörn Granlund) writes: > > > 2. follow Marco's proposal allowing "char", "short", "int", "long", and > > perhaps the spacey "long long" as overriding types, or > > I guess that's good enough for now. But is it that

Re: Small limb-size in mini-gmp?

2019-11-13 Thread Niels Möller
t...@gmplib.org (Torbjörn Granlund) writes: > 2. follow Marco's proposal allowing "char", "short", "int", "long", and > perhaps the spacey "long long" as overriding types, or I guess that's good enough for now. But is it that difficult to do quoting of "unsigned char"? Something like make

Re: Small limb-size in mini-gmp?

2019-11-13 Thread Torbjörn Granlund
Let's not make the best is the enemy of the good! I suggest that we either, 1. do nothing now, or 2. follow Marco's proposal allowing "char", "short", "int", "long", and perhaps the spacey "long long" as overriding types, or 3. allow the use of asl.h. I am not sure we should support that with

Re: Small limb-size in mini-gmp?

2019-11-13 Thread Vincent Lefevre
On 2019-11-13 17:41:47 +0100, Marco Bodrato wrote: > I did hope that "unsigned" were just a modifier... > > But it seems that a line like the following is not allowed > > typedef unsigned uint128_t mp_limb_t > > I do not understand why... If it were a modifier, then I suppose that "signed"

Re: Small limb-size in mini-gmp?

2019-11-13 Thread Marco Bodrato
Il 2019-11-13 16:28 Vincent Lefevre ha scritto: On 2019-11-12 22:22:00 +0100, Marco Bodrato wrote: Is something like the following too tricky? #ifndef MINI_GMP_LIMB_TYPE #define MINI_GMP_LIMB_TYPE long #endif typedef unsigned MINI_GMP_LIMB_TYPE mp_limb_t As only unsigned types are

Re: Small limb-size in mini-gmp?

2019-11-13 Thread Vincent Lefevre
On 2019-11-12 22:22:00 +0100, Marco Bodrato wrote: > Is something like the following too tricky? > > #ifndef MINI_GMP_LIMB_TYPE > #define MINI_GMP_LIMB_TYPE long > #endif > > typedef unsigned MINI_GMP_LIMB_TYPE mp_limb_t > > As only unsigned types are supported... Unsigned types do not