[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gmp-bugs
Subject:    GMP 6.1.0 release candidate available
From:       nisse () lysator ! liu ! se (Niels =?utf-8?Q?M=C3=B6ller?=)
Date:       2015-10-31 14:45:55
Message-ID: nnk2q36qqk.fsf () armitage ! lysator ! liu ! se
[Download RAW message or body]

tg at gmplib.org (Torbj?rn Granlund) writes:

> nisse at lysator.liu.se (Niels M?ller) writes:
>
>   For the the case of writing tests , the rrandomb-style funtions are very
>   useful, but my gut feeling is still that they don't belong in mini-gmp.
>   
> Cannot GMP be used for generating test values for mini-gmp?

That's what the current mini-gmp tests do. There's one compilation unit
which includes gmp.h (and not mini-gmp.h), with various helper functions
which call gmp and convert all bignum inputs and outputs to and from hex
strings.

> One would need to be careful when linking things so that mini-gmp
> functions are  preferred.  This,
>
>   gcc test.c minigmp.a libgmp.a
>
> should work correctly since the linker works left-to-right when
> resolving symbols.

To the linker, the symbols are completely distinct in gmp and mini-gmp,
since mini-gmp doesn't do any name-mangling. The tricky thing is that we
have two possibly incompatible definitions of the type mpz_t. That's why
each compilation unit in the mini-gmp tests includes either gmp.h or
mini-gmp.h but never both.

Regards,
/Niels

-- 
Niels M?ller. PGP-encrypted email is preferred. Keyid C0B98E26.
Internet email is subject to wholesale government surveillance.

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic