Re: mini-gmp warnings

2020-04-26 Thread Vincent Lefevre
On 2020-04-26 14:31:21 +0200, Niels Möller wrote: > I'm updating the copy of mini-gmp I use in nettle to the latest version. > In Nettle, it's compiled with gcc -Wall, and I some new warnings, like > > /home/nisse/hack/nettle/mini-gmp.c: In function ‘mpn_common_scan’: > /home/nisse/hack/nettle/min

Re: mini-gmp warnings

2020-04-26 Thread Niels Möller
Marco Bodrato writes: > The following line works in my environment: > > make CPPFLAGS="-DMINI_GMP_LIMB_TYPE=char" check-mini-gmp Thanks, seems to work fine (and make clean-mini-gmp before changing limb size). Regards, /Niels -- Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677. I

Re: mini-gmp warnings

2020-04-26 Thread Marco Bodrato
Il 2020-04-26 16:22 ni...@lysator.liu.se ha scritto: Is there an easy way to run mini-gmp tests with small limb size? In mini-gmp/mini-gmp.h we have the following lines: #ifndef MINI_GMP_LIMB_TYPE #define MINI_GMP_LIMB_TYPE long #endif typedef unsigned MINI_GMP_LIMB_TYPE mp_limb_t; So, you s

Re: mini-gmp warnings

2020-04-26 Thread Niels Möller
Marco Bodrato writes: >> Now I've tried changing it, and it seems to also be a hack to avoid >> warnings? > > Exactly. Annoying... I have filed a gcc bug. See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94773 > I agree with your first proposal: use unsigned. I'll do that, then. Is there an ea

Re: mini-gmp warnings

2020-04-26 Thread Marco Bodrato
Ciao, Il 2020-04-26 15:11 ni...@lysator.liu.se ha scritto: ni...@lysator.liu.se (Niels Möller) writes: There are a couple of other uses of LOCAL_SHIFT_BITS, LOCAL_GMP_LIMB_BITS, LOCAL_CHAR_BIT, added as part of the support for testing with small limb sizes. Is it for some reason important to r

Re: mini-gmp warnings

2020-04-26 Thread Niels Möller
ni...@lysator.liu.se (Niels Möller) writes: > There are a couple of other uses of LOCAL_SHIFT_BITS, > LOCAL_GMP_LIMB_BITS, LOCAL_CHAR_BIT, added as part of the support for > testing with small limb sizes. Is it for some reason important to refer > to these constants via int variables? They all loo

mini-gmp warnings

2020-04-26 Thread Niels Möller
I'm updating the copy of mini-gmp I use in nettle to the latest version. In Nettle, it's compiled with gcc -Wall, and I some new warnings, like /home/nisse/hack/nettle/mini-gmp.c: In function ‘mpn_common_scan’: /home/nisse/hack/nettle/mini-gmp.c:99:23: warning: comparison of integer expressions o