Re: unused macro MPN_PTR_SWAP in mini-gmp.c

2022-03-17 Thread Marco Bodrato
Ciao Paul, Il 2022-03-09 02:56 Paul Eggert ha scritto: In libgmp 6.2.1, mini-gmp.c defines a macro without using it, causing Thanks for spotting this! Proposed patch attached. There is also a different possible way to heal the problem: using it :-D diff -r a44f487c8d20

unused macro MPN_PTR_SWAP in mini-gmp.c

2022-03-17 Thread Paul Eggert
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: lib/mini-gmp.c:251: warning: macro "MPN_PTR_SWAP" is not used [-Wunused-macros] 251 | #define MPN_PTR_SWAP(xp,xs, yp,ys) \ |

Re: 2 minor issues on Windows

2022-03-17 Thread George Woltman
Might you consider (I verified it works): #if defined (_MSC_VER) #pragma warning(push) #pragma warning(disable: 4146) // unary minus operator applied to unsigned type, result still unsigned #endif *__gmp_rp = (- *__gmp_up) & GMP_NUMB_MASK; #if defined (_MSC_VER) #pragma warning(pop) #endif