Warning when compiling on NetBSD/sparc64

Marc Glisse marc.glisse at inria.fr
Sat Nov 30 18:34:17 UTC 2013

On Sat, 30 Nov 2013, Niels Möller wrote:

> Martin Husemann <martin at duskware.de> writes:
>> when compiling gmp 5.1.3 on a NetBSD/sparc64 machine, gcc complains:
>> divrem_2.c: In function '__gmpn_divrem_2':
>> divrem_2.c:101:4: warning: right shift count >= width of type
>> (in mpn/generic).
>> I have bean unable to unriddle the macro - so I'm reporting it here.
> What does the offending lines look like? Your line numbers don't match
> mine. (line 101 in my divrem_2.c is an invocation of udiv_qr_3by2, which
> contains no rght shift as far as I see).

udiv_qr_3by2 uses add_ssaaaa which has some ">> 32" on sparc64. A 
preprocessed version of divrem_2.c would help (the relevant line is likely 
to be huge, please insert line breaks in it and compile to see where the 
error is precisely).

> Also, I'd like to see the configure command and the compilation command
> line.

With everything asked here:

Marc Glisse

More information about the gmp-bugs mailing list