From a1b79567a8253a8e8a1ceed02145a64b87a4768d Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sat, 18 Aug 2018 20:47:24 -0700 Subject: [PATCH] Simplify float_arith_driver MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit * src/data.c (float_arith_driver): Simplify, as we needn’t worry about that 30-year-old compiler bug any more. --- src/data.c | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/src/data.c b/src/data.c index 7a8179ed38d..5ef0ef85571 100644 --- a/src/data.c +++ b/src/data.c @@ -2966,26 +2966,14 @@ static Lisp_Object float_arith_driver (double accum, ptrdiff_t argnum, enum arithop code, ptrdiff_t nargs, Lisp_Object *args) { - register Lisp_Object val; - double next; - for (; argnum < nargs; argnum++) { - /* using args[argnum] as argument to CHECK_NUMBER_... */ - val = args[argnum]; + Lisp_Object val = args[argnum]; CHECK_NUMBER_COERCE_MARKER (val); + double next = (FIXNUMP (val) ? XFIXNUM (val) + : FLOATP (val) ? XFLOAT_DATA (val) + : mpz_get_d (XBIGNUM (val)->value)); - if (FLOATP (val)) - { - next = XFLOAT_DATA (val); - } - else if (BIGNUMP (val)) - next = mpz_get_d (XBIGNUM (val)->value); - else - { - args[argnum] = val; /* runs into a compiler bug. */ - next = XFIXNUM (args[argnum]); - } switch (code) { case Aadd: -- 2.39.2