• Paul Eggert's avatar
    Fix problems with logxor etc. and fixnums · 64eb9b71
    Paul Eggert authored
    These operations incorrectly treated negative fixnums as
    bignums greater than most-positive-fixnum.
    * src/alloc.c (mpz_set_intmax_slow): Avoid undefined
    behavior if signed unary negation overflows, while
    we’re in the neighborhood.
    (mpz_set_uintmax_slow): Remove.  All uses removed.
    * src/data.c (arith_driver): Treat fixnums as signed, not
    unsigned, even for logical operations.
    * src/lisp.h (mpz_set_uintmax): Remove.  All uses removed.
    * test/src/data-tests.el (data-tests-logand)
    (data-tests-logior, data-tests-logxor): New tests.
    64eb9b71
alloc.c 200 KB