Re: unused macro MPN_PTR_SWAP in mini-gmp.c

2022-03-19 Thread Niels Möller
Paul Eggert writes: > In libgmp 6.2.1, mini-gmp.c defines a macro without using it, causing > the command "gcc -Wunused-macros -Werror" to fail with the following > diagnostic: I haven't used -Wunused-macros before, I take it it warns only about macros defined in .c files? Since it's perfectly

Re: unused macro MPN_PTR_SWAP in mini-gmp.c

2022-03-19 Thread Paul Eggert
On 3/17/22 11:32, Marco Bodrato wrote:  mpz_swap (mpz_t u, mpz_t v)  {    MP_SIZE_T_SWAP (u->_mp_size, v->_mp_size); -  MP_SIZE_T_SWAP (u->_mp_alloc, v->_mp_alloc); -  MP_PTR_SWAP (u->_mp_d, v->_mp_d); +  MPN_PTR_SWAP (u->_mp_d, u->_mp_alloc, v->_mp_d, v->_mp_alloc); Thank you, this looks