From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Michael Heerdegen Newsgroups: gmane.emacs.bugs Subject: bug#61730: 30.0.50; Compiler warnings for delq and delete Date: Fri, 24 Feb 2023 16:11:51 +0100 Message-ID: <87fsavf688.fsf@web.de> References: <87ilfsisje.fsf@web.de> <670D8E4A-333D-4E2D-97CC-86728965989D@gmail.com> <83a613np4p.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="4970"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= , 61730@debbugs.gnu.org, monnier@iro.umontreal.ca To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Feb 24 16:18:34 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 1pVZqE-0001AW-8k for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 24 Feb 2023 16:18:34 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pVZpp-0004Gx-Mj; Fri, 24 Feb 2023 10:18:09 -0500 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 1pVZpk-0004GS-Nw for bug-gnu-emacs@gnu.org; Fri, 24 Feb 2023 10:18:04 -0500 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 1pVZpk-0003GB-Ca for bug-gnu-emacs@gnu.org; Fri, 24 Feb 2023 10:18:04 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pVZpi-0000p5-6i for bug-gnu-emacs@gnu.org; Fri, 24 Feb 2023 10:18:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Michael Heerdegen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 24 Feb 2023 15:18:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61730 X-GNU-PR-Package: emacs Original-Received: via spool by 61730-submit@debbugs.gnu.org id=B61730.16772518743147 (code B ref 61730); Fri, 24 Feb 2023 15:18:02 +0000 Original-Received: (at 61730) by debbugs.gnu.org; 24 Feb 2023 15:17:54 +0000 Original-Received: from localhost ([127.0.0.1]:37923 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pVZpZ-0000og-RS for submit@debbugs.gnu.org; Fri, 24 Feb 2023 10:17:54 -0500 Original-Received: from mout.web.de ([212.227.15.3]:52085) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pVZpY-0000oU-M1 for 61730@debbugs.gnu.org; Fri, 24 Feb 2023 10:17:53 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=s29768273; t=1677251866; i=michael_heerdegen@web.de; bh=bN+8FoBf2tfPzyfg73xu3X49eYp4n9pDOrkUwdscKI8=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date; b=TT1FHZasX8pwQyLpCB6B0dnoNV/bFWABA3Lt+AAIjYR2V9WC8f0bZYW0srbA5y++K pRZPFsiNBM/NvFCpDhX4k4SvYmU/INLb6zh75/vPuTpSmvAQypRXiqlxbZXq3gLaU+ 6nrPgH9TdOj7r8Tg3hPo4rvFnqTVfMP+/ke+gv+bnA0j9cjl1p7EM2Fp8hWcj1CKyt hbFAxVc807jvKk0nJT6s/5vBt6iolWVDSnRIA2tru9QnmBabcLgwDfqxW3+SEywhLe K3Vx6PvlTzLLrCc0Wkx6LzY90ZvTKGWJ7P4rti9EYT2iD3SPXlc/krIiBjwku4RiNS ah5nBDSf0PLKg== X-UI-Sender-Class: 814a7b36-bfc1-4dae-8640-3722d8ec6cd6 Original-Received: from drachen.dragon ([84.59.210.57]) by smtp.web.de (mrweb006 [213.165.67.108]) with ESMTPSA (Nemesis) id 1N1LsV-1oURB43MF9-012USs; Fri, 24 Feb 2023 16:12:02 +0100 In-Reply-To: <83a613np4p.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 24 Feb 2023 15:56:22 +0200") X-Provags-ID: V03:K1:yx0E77sDabtXIkkf4OhtlwFa3tiMjZRowBfL2QbFkSBVmEeIgzg iUftbPrp8ssgSv5dzI/a2FVtvwDFI2/7/BhGTXihPsYzvhKcPkfLNB4QVdjD3jmddKg4w9K SGfVHtkdEH66B0dJ8j2/xoHS49UtSsBSOk4sta0NtwrXEEpOmpC+oGLnjR6p/5u/2X+4tHe h6hfFw1P+tvMAYfT/qiKA== UI-OutboundReport: notjunk:1;M01:P0:bc0lS5NNdTw=;rNxea+3SQEyPMnwSjtZJHQUQQZ4 l9CEivDcegSKqtDy+EpP+UHEqQgQe6cU5k7iogPLAG4gPpB7oLpJv0k12TSrDYZaEol4BJt00 +5VsbwQlDPjx48VnhQH++J0ay82ySSQQJ5lV0uUZkLXEsOBsBFibr+P1RSK4kEzN7cIxWHgTh S8TC3VjyBzQXj9BgwLku/CQWovVyfVeuVEIL25GyUx8KBHLL7hmmcGDjKlJTdl8/LkuxnAXBp p8xVtexY3Al8pPBxyZmgQ9CjLYqr+/4PtfmsxhwP8qNm638GuRnU5VwqU+hBQSkmWbC0RZM4x KZ8W7ZNA5RxZr7uanrvpX+vsSDcADqvnB0PHhWwyc0pbBmwgZCTqeKIuQs0rXsKIm7zSPWMQk j94zRMNyVmwPX6SB5ijLQk23PQ3P010s5CbZkab1UKo8+dy72l4+ZP27ESD5PTUXIl4IBFSdi WmNX31OrKjm+huyw95vKiN3Lr6hUNLPH0oLAwqfx2tWJy0jokU6L83KC0o/AvXMHsD8vCbyeo w2aJuKurbrhy44mhU1QsPiE+X+9EThqSJXVYeANrZyU2wJGh8dv4vhzQ/61rZztpLBQDm0h/2 Zmpk9H9G9u6ucs8b8zsx4/hLEB/wCCHoT+ZkaKuMKHUGWbJ28Qn44M6Bp4ED+UZjJSFZOGzGR D5nQvRYFq4aLA6osGTmaFCaXt7hHii67u3EcWXliEZfV30FBu0YwQX6L2tO1JghUAfu+Tt82s Uqw8wDwDxDE9iwZKoc1qZYHT7/Rd8O+sgCjC0KDXdA2pLX4nLCOpxb5gRsPqZMSeX+bNY++z 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:256613 Archived-At: Eli Zaretskii writes: > > Thus such a warning definitely falls on the beneficial side. Let's do it. > > I'd hate to see Emacs's byte compiler becoming the Big Brother who > knows better. Richard described a couple of situations where the > "problematic" usage is completely legitimate and safe He mentioned only one: "when you know that the elements to be deleted cannot include the first element", and that's the only one I know. Are there more? Even that case is a burden to the reader and the maintainer, because one has to think about and verify that this condition is fulfilled. And IMO this case is more dangerous than the `mapcar' case which just produces slightly more inefficient code. But yes, we would warn about some legitimate and safe calls. The advantages outweigh the disadvantages in my opinion. > please try not to emit the warning in those cases. I think this is impossible. The compiler can't know or prove whether the element to delete is different from the first one. Michael.