From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Newsgroups: gmane.emacs.bugs Subject: bug#63807: bug in compose-gstring-for-terminal? Date: Wed, 31 May 2023 17:08:58 +0200 Message-ID: References: <83a5xkfyc8.fsf@gnu.org> <559C2D0F-D71E-433B-AE1A-888EBBD134CD@gmail.com> <83sfbcefpa.fsf@gnu.org> Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.15\)) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="28321"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 63807@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed May 31 17:10:46 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1q4NTJ-00078Q-J9 for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 31 May 2023 17:10:45 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q4NSq-0004Ty-9T; Wed, 31 May 2023 11:10:16 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q4NSd-0004Dn-Ak for bug-gnu-emacs@gnu.org; Wed, 31 May 2023 11:10:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1q4NSc-0004NF-I9 for bug-gnu-emacs@gnu.org; Wed, 31 May 2023 11:10:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1q4NSb-0003JF-LT for bug-gnu-emacs@gnu.org; Wed, 31 May 2023 11:10:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 31 May 2023 15:10:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 63807 X-GNU-PR-Package: emacs Original-Received: via spool by 63807-submit@debbugs.gnu.org id=B63807.168554575112655 (code B ref 63807); Wed, 31 May 2023 15:10:01 +0000 Original-Received: (at 63807) by debbugs.gnu.org; 31 May 2023 15:09:11 +0000 Original-Received: from localhost ([127.0.0.1]:36186 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q4NRm-0003I2-S3 for submit@debbugs.gnu.org; Wed, 31 May 2023 11:09:11 -0400 Original-Received: from mail-lf1-f47.google.com ([209.85.167.47]:50510) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q4NRi-0003HU-0X for 63807@debbugs.gnu.org; Wed, 31 May 2023 11:09:09 -0400 Original-Received: by mail-lf1-f47.google.com with SMTP id 2adb3069b0e04-4f3baf04f0cso6852515e87.1 for <63807@debbugs.gnu.org>; Wed, 31 May 2023 08:09:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1685545740; x=1688137740; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:sender:from:to:cc:subject :date:message-id:reply-to; bh=56gDhYWq7knTbZ8M8sc90lKIo4IxP57DNPuyDEJVMeE=; b=irLrJCqnOoNA87f4xix9MkGKdjDbKaLWcZ45ITqqkXThdhuHaman1qtyXGofshUycf ++yTQoPtuIi/Km1/536iqWYo0K3OhbfnSePfdgsqF+ZmQFuxndLyAN0RuBpA5v1JtkWx N4ujsXJKc6/m2YXmFB9PGP20QIQVH7N8L/+ensgh7vvgZIi3OLV2fnt+d5H2FrtdX2iZ mg20j62EaiotRuNontPXYGyC2qFhuMsfCbxu6V0qNGQ3qrQ944YO+kJoUq21iL2CBTuL 8tdSJLK6K795kaEUWdzAT32dWCqfqS7/Hts+cwX+zCXzwdEyFCV+8UIRiaAlIuuU9ZfE qkNA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685545740; x=1688137740; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:sender:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=56gDhYWq7knTbZ8M8sc90lKIo4IxP57DNPuyDEJVMeE=; b=awqPcDFC+dsb3FLU15S53DKKmfLX0e7srCT5doMfApq/RPavcTQjYdmYgYd4dw5Xn7 WQNu/mMkiGNYlKblkKy7ru03zTUsk0ZzO0zwME9QQrIYu0NforXAXp6e+sCR07sha2H0 mw76sAUqpsOL543c6ZTLQ8rXmxzBsWvFkbGG1qA31Zm8Xb+/s/Y/78jYHmB1FIaZuQyB nWHsze8brTxzN3goJ5u9vUhs4HLfPJiEGUabBsiHzbexvCgcSC1njbvFn/NHp+JSx98p a7eqL0y1qXeoo/Lho3wteUBThd/mZ99rWIo1AfrTC4QT8t8Rei5xcTcwsJa4p++H4Rlk jMiw== X-Gm-Message-State: AC+VfDzfQSMWy+zHyNFvngIzelRrxeyP+Tz2Jq5bqMXOpSqTkG9lQ2ZR kyq0biNHu0ZvTX1KoMPKteEngp4LG4c= X-Google-Smtp-Source: ACHHUZ5KkZi+jAXU2lQDdvhdpTM0um8SV0PcdxrNDtnLCYP3pGbsp7/os5hBaCUuV6XjvG2p5T3Qxw== X-Received: by 2002:a2e:9cd8:0:b0:2a8:ac69:bfe with SMTP id g24-20020a2e9cd8000000b002a8ac690bfemr2990039ljj.42.1685545739651; Wed, 31 May 2023 08:08:59 -0700 (PDT) Original-Received: from smtpclient.apple (c188-150-165-235.bredband.tele2.se. [188.150.165.235]) by smtp.gmail.com with ESMTPSA id p5-20020a2e8045000000b002ac8164d77fsm3358545ljg.86.2023.05.31.08.08.58 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 31 May 2023 08:08:59 -0700 (PDT) In-Reply-To: <83sfbcefpa.fsf@gnu.org> X-Mailer: Apple Mail (2.3654.120.0.1.15) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:262672 Archived-At: 31 maj 2023 kl. 16.30 skrev Eli Zaretskii : > If we agree that replacing (+ 2) with (+ i 2) is "completely safe", > then we basically agree that this code runs only when i =3D=3D 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.)