From: Eli Zaretskii <eliz@gnu.org>
To: Paul Eggert <eggert@cs.ucla.edu>
Cc: 30408@debbugs.gnu.org
Subject: bug#30408: Checking for loss of information on integer conversion
Date: Thu, 29 Mar 2018 14:11:10 +0300 [thread overview]
Message-ID: <83605fdtm9.fsf@gnu.org> (raw)
In-Reply-To: <f1e3e23f-7ac2-9840-403b-e4d76f1ed83c@cs.ucla.edu> (message from Paul Eggert on Tue, 27 Mar 2018 16:19:21 -0700)
> From: Paul Eggert <eggert@cs.ucla.edu>
> Date: Tue, 27 Mar 2018 16:19:21 -0700
>
> Here's a patch that I hope addresses the main problem. The basic idea is
> to avoid the confusion exemplified in Bug#30408 by changing Emacs so
> that it ordinarily signals an error if it reads a program that contains
> an integer literal that is out of fixnum range. However, if the
> out-of-range literal is followed by '.' then Emacs continues to silently
> convert it to floating-point; this is intended as an escape hatch for
> any programs that need the old behavior (I expect this'll be rare).
I'd suggest, for a good measure, to have a variable which would force
the conversion to floats, avoiding an error even without the trailing
period. We can later remove that variable, or make it a no-op, if the
danger of breaking existing code turns out low or non-existent.
next prev parent reply other threads:[~2018-03-29 11:11 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-18 1:27 Checking for loss of information on integer conversion Paul Eggert
[not found] ` <83y3jq9q4m.fsf@gnu.org>
2018-02-18 20:04 ` Paul Eggert
2018-02-18 20:24 ` Eli Zaretskii
2018-03-09 5:00 ` bug#30408: " Paul Eggert
2018-03-09 8:22 ` Eli Zaretskii
2018-03-21 19:13 ` Paul Eggert
2018-03-21 19:29 ` Eli Zaretskii
2018-02-18 20:24 ` Eli Zaretskii
2018-02-18 21:52 ` Drew Adams
2018-02-18 20:04 ` Paul Eggert
2018-03-27 23:19 ` Paul Eggert
2018-03-29 11:11 ` Eli Zaretskii [this message]
2018-03-29 18:09 ` Paul Eggert
2018-02-18 22:31 ` Juliusz Chroboczek
2018-02-18 22:41 ` Stefan Monnier
2018-02-18 23:46 ` Juliusz Chroboczek
2018-02-19 1:47 ` Stefan Monnier
2018-02-19 2:22 ` Paul Eggert
2018-02-19 3:20 ` Drew Adams
2018-02-19 15:05 ` Richard Stallman
2018-02-22 16:31 ` Juliusz Chroboczek
2018-02-22 17:01 ` Eli Zaretskii
2018-02-22 19:31 ` Stefan Monnier
2018-02-23 9:49 ` Richard Stallman
2018-02-19 6:03 ` John Wiegley
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83605fdtm9.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=30408@debbugs.gnu.org \
--cc=eggert@cs.ucla.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.