emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Merging bignum to master


From: Andy Moreton
Subject: Re: Merging bignum to master
Date: Wed, 15 Aug 2018 16:46:46 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1.50 (windows-nt)

On Sat 11 Aug 2018, Tom Tromey wrote:

> I'm merging bignum to master now, then I'm going to delete the
> now-obsolete feature branch.  Please report any problems you find.

I've noticed a bug in bignumcompare for 64bit Windows: it handles large
positive fixnums correctly, but not large negative fixnums. A patch liek
this should fix it:

    AndyM


diff --git a/src/data.c b/src/data.c
index a1215b9d6b..c89fa3cf51 100644
--- a/src/data.c
+++ b/src/data.c
@@ -2409,7 +2409,7 @@ bignumcompare (Lisp_Object num1, Lisp_Object num2,
        }
       else if (FIXNUMP (num2))
         {
-          if (sizeof (EMACS_INT) > sizeof (long) && XFIXNUM (num2) > LONG_MAX)
+          if (sizeof (EMACS_INT) > sizeof (long))
             {
               mpz_t tem;
               mpz_init (tem);
@@ -2440,7 +2440,7 @@ bignumcompare (Lisp_Object num1, Lisp_Object num2,
       else
         {
          eassume (FIXNUMP (num1));
-          if (sizeof (EMACS_INT) > sizeof (long) && XFIXNUM (num1) > LONG_MAX)
+          if (sizeof (EMACS_INT) > sizeof (long))
             {
               mpz_t tem;
               mpz_init (tem);




reply via email to

[Prev in Thread] Current Thread [Next in Thread]