Warning when compiling on NetBSD/sparc64

Niels Möller nisse at lysator.liu.se
Sat Nov 30 21:52:30 UTC 2013

Martin Husemann <martin at duskware.de> writes:

> The attached patch kills all warnings for me - but is this correct?
> Are these values unsigned?

The type is mp_limb_t, which should be unsigned long in your build (but
for some platforms, it's unsigned long long). And longlong.h uses its
own conventions for type names, which I'm not very familiar with,
probably the right type is UWtype.

A better fix is to add CNST_LIMB for all constants passed to these
macros, like

	  udiv_qr_3by2 (q, r1, r0, r1, r0, CNST_LIMB(0), d1, d0, di.inv32);

at line 101 in divrem_2.c. As Marc said, that was apparently fixed some
months ago in the development sources.


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

More information about the gmp-bugs mailing list