aboutsummaryrefslogtreecommitdiffstats
path: root/src/bignum.c
diff options
context:
space:
mode:
authorPaul Eggert2018-09-11 11:21:11 -0700
committerPaul Eggert2018-09-11 11:34:43 -0700
commitfa3785ea5fd73eaba84b8e3b8f988dd53f3a4148 (patch)
tree3b37f928b5c5b80a92e467f2b49c333e05cf7b3b /src/bignum.c
parent94297848332f01a18b5a6a7d29f46d03dcd881ec (diff)
downloademacs-fa3785ea5fd73eaba84b8e3b8f988dd53f3a4148.tar.gz
emacs-fa3785ea5fd73eaba84b8e3b8f988dd53f3a4148.zip
Use overflow-error for bignum overflow
This better corresponds to what emacs-26 did in the rare cases where it checked for integer overflow. * src/alloc.c (range_error): Remove. All uses changed to overflow_error. * src/eval.c (overflow_error): New function.
Diffstat (limited to 'src/bignum.c')
-rw-r--r--src/bignum.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/bignum.c b/src/bignum.c
index f4c24d132be..2da2c961c47 100644
--- a/src/bignum.c
+++ b/src/bignum.c
@@ -80,7 +80,7 @@ make_bignum_bits (size_t bits)
80 /* The documentation says integer-width should be nonnegative, so 80 /* The documentation says integer-width should be nonnegative, so
81 a single comparison suffices even though 'bits' is unsigned. */ 81 a single comparison suffices even though 'bits' is unsigned. */
82 if (integer_width < bits) 82 if (integer_width < bits)
83 range_error (); 83 overflow_error ();
84 84
85 struct Lisp_Bignum *b = ALLOCATE_PSEUDOVECTOR (struct Lisp_Bignum, value, 85 struct Lisp_Bignum *b = ALLOCATE_PSEUDOVECTOR (struct Lisp_Bignum, value,
86 PVEC_BIGNUM); 86 PVEC_BIGNUM);