Arithmetic overflows now return float rather than wrapping around.
commit7fc4768c45bce52d34f183eb4734d9f58745ea3d
authorPaul Eggert <eggert@cs.ucla.edu>
Tue, 3 May 2011 07:51:38 +0000 (3 00:51 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Tue, 3 May 2011 07:51:38 +0000 (3 00:51 -0700)
treeb7414afb75c1fc941f8a9dd9e6b900cbd1eb9f23
parentfed14fd75201f3c313293432e58de8f860979a3e
Arithmetic overflows now return float rather than wrapping around.

* data.c: Include <intprops.h>.
(arith_driver): Use floating point if the accumulator would otherwise
go out of EMACS_INT range.
(arith_driver, Fadd1, Fsub1): Use floating point if the result is
out of Emacs fixnum range.
* bytecode.c (exec_byte_code): Likewise, for Bsub1, Badd1, Bnegate.
src/ChangeLog
src/bytecode.c
src/data.c