>From ecd7a9407711ebe24d7e07d4402a2d66754ee693 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 19 Aug 2018 10:05:41 -0700 Subject: [PATCH] Fix expt signedness bug --without-wide-int Problem reported by Federico in: https://lists.gnu.org/r/emacs-devel/2018-08/msg00619.html * src/floatfns.c (Fexpt): Use TYPE_RANGED_FIXNUMP, not RANGED_FIXNUMP, to fix bug with unsigned comparison on platforms built --without-wide-int. --- src/floatfns.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/floatfns.c b/src/floatfns.c index 54d068c29e..7c52a0a9a2 100644 --- a/src/floatfns.c +++ b/src/floatfns.c @@ -212,7 +212,7 @@ DEFUN ("expt", Fexpt, Sexpt, 2, 2, 0, if (INTEGERP (arg1) && NATNUMP (arg2)) { unsigned long exp; - if (RANGED_FIXNUMP (0, arg2, ULONG_MAX)) + if (TYPE_RANGED_FIXNUMP (unsigned long, arg2)) exp = XFIXNUM (arg2); else if (MOST_POSITIVE_FIXNUM < ULONG_MAX && BIGNUMP (arg2) && mpz_fits_ulong_p (XBIGNUM (arg2)->value)) -- 2.17.1