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
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)
\
|
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