diff --git a/src/lread.c b/src/lread.c index 6eda7405409..9ddd8d5a7f6 100644 --- a/src/lread.c +++ b/src/lread.c @@ -3797,7 +3797,12 @@ string_to_number (char const *string, int base, int flags) value = n; if (! (state & DOT_CHAR) && ! (flags & S2N_OVERFLOW_TO_FLOAT)) - xsignal1 (Qoverflow_error, build_string (string)); + { + AUTO_STRING (fmt, ("%s 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)); + } } /* Either the number uses float syntax, or it does not fit into a fixnum.