From: Paul Eggert Date: Sat, 21 Jul 2018 07:25:27 +0000 (-0700) Subject: Report base of out-of-range input fixnums X-Git-Tag: emacs-27.0.90~4664^2~51 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=1780502da6b9ac8d3063dfd56f675318568283dc;p=emacs.git Report base of out-of-range input fixnums * src/lread.c (string_to_number): Report the base of an out-of-range fixnum. Problem reported by Andy Moreton in: https://lists.gnu.org/r/emacs-devel/2018-07/msg00696.html --- diff --git a/src/lread.c b/src/lread.c index 4eba8635521..50fc6ef8f3a 100644 --- a/src/lread.c +++ b/src/lread.c @@ -3798,10 +3798,11 @@ string_to_number (char const *string, int base, int flags) if (! (state & DOT_CHAR) && ! (flags & S2N_OVERFLOW_TO_FLOAT)) { - AUTO_STRING (fmt, ("%s is out of fixnum range; " + AUTO_STRING (fmt, ("%s (base %d) is out of fixnum range; " "maybe set `read-integer-overflow-as-float'?")); AUTO_STRING_WITH_LEN (arg, string, cp - string); - xsignal1 (Qoverflow_error, CALLN (Fformat_message, fmt, arg)); + xsignal1 (Qoverflow_error, + CALLN (Fformat_message, fmt, arg, make_number (base))); } }