mini-gmp: error: no previous prototype for 'mpz_lucas_mod'

Marco Bodrato bodrato at
Tue Jan 1 20:23:14 UTC 2019


Il Lun, 31 Dicembre 2018 10:01 am, Niels Möller ha scritto:
> Vincent Lefevre <vincent at> writes:
>> I get the following error when compiling mini-gmp.c:
>> mini-gmp.c:3486:1: error: no previous prototype for 'mpz_lucas_mod'
>> [-Werror=missing-prototypes]
>>  3486 | mpz_lucas_mod (mpz_t V, mpz_t Qk, long Q,

> Hi, a late reply on this issue. It seems the current workaround is to
> have a check for __MIN_GMP_TESTING in mini-gmp.c, and a prototype in
> t-lucm.c.
> A different way to do it is to add a wrapper in testutils.c (which

The wrapper you propose is more elegant than the workaround I used.
I removed the _TESTING definition and pushed it:

Now, the internal _lucas_mod function is simply static.



More information about the gmp-bugs mailing list