From: "Mattias Engdegård" <mattias.engdegard@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 63807@debbugs.gnu.org
Subject: bug#63807: bug in compose-gstring-for-terminal?
Date: Wed, 31 May 2023 17:08:58 +0200 [thread overview]
Message-ID: <C47A2E91-D33A-4B27-AC3A-DE0F5832736C@gmail.com> (raw)
In-Reply-To: <83sfbcefpa.fsf@gnu.org>
31 maj 2023 kl. 16.30 skrev Eli Zaretskii <eliz@gnu.org>:
> If we agree that replacing (+ 2) with (+ i 2) is "completely safe",
> then we basically agree that this code runs only when i == zero,
> right?
Yes -- that is, if we trust external invariants to enforce that it indeed only runs when i is 0. Otherwise, the current code is incorrect and changing it would fix a bug. Either way, changing it should do no harm and has the possibility of improving correctness.
I was unable to provoke that particular code to run for strings longer than 1 chars but that could just be my own ineptitude, and in any case it seems unsafe to rely on it. Maybe you could come up with an example?
(And to answer your question that I edited out in haste: there are no plans to warn about unary applications of `+`. This was just something I stumbled upon while researching something else.)
next prev parent reply other threads:[~2023-05-31 15:08 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-30 20:36 bug#63807: bug in compose-gstring-for-terminal? Mattias Engdegård
2023-05-31 13:02 ` Eli Zaretskii
2023-05-31 13:49 ` Mattias Engdegård
2023-05-31 14:30 ` Eli Zaretskii
2023-05-31 15:08 ` Mattias Engdegård [this message]
2023-05-31 16:15 ` Eli Zaretskii
2023-05-31 17:23 ` Mattias Engdegård
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=C47A2E91-D33A-4B27-AC3A-DE0F5832736C@gmail.com \
--to=mattias.engdegard@gmail.com \
--cc=63807@debbugs.gnu.org \
--cc=eliz@gnu.org \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).