]> git.eshelyaron.com Git - emacs.git/commit
Fix problems with logxor etc. and fixnums
authorPaul Eggert <eggert@cs.ucla.edu>
Fri, 17 Aug 2018 07:25:20 +0000 (00:25 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Fri, 17 Aug 2018 07:26:19 +0000 (00:26 -0700)
commit64eb9b71da7c3c34541929c1b0dfb7f0c11d3d88
tree0b905edf417cb3e62706d84e5776a2a26065453f
parent3b9017b5ba6b7041fbf70691092533286cc9b98d
Fix problems with logxor etc. and fixnums

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.
src/alloc.c
src/data.c
src/lisp.h
test/src/data-tests.el