From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#61730: 30.0.50; Compiler warnings for delq and delete Date: Fri, 24 Feb 2023 17:48:03 +0200 Message-ID: <83zg93m5e4.fsf@gnu.org> References: <87ilfsisje.fsf@web.de> <670D8E4A-333D-4E2D-97CC-86728965989D@gmail.com> <83a613np4p.fsf@gnu.org> <87fsavf688.fsf@web.de> <831qmfnkto.fsf@gnu.org> <87bkljf4oh.fsf@web.de> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7499"; mail-complaints-to="usenet@ciao.gmane.io" Cc: mattias.engdegard@gmail.com, 61730@debbugs.gnu.org, monnier@iro.umontreal.ca To: Michael Heerdegen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Feb 24 16:49:13 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 1pVaJt-0001oG-Dj for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 24 Feb 2023 16:49:13 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pVaJm-0001sZ-KQ; Fri, 24 Feb 2023 10:49:06 -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 1pVaJi-0001s4-Nf for bug-gnu-emacs@gnu.org; Fri, 24 Feb 2023 10:49: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 1pVaJi-0004BQ-5n for bug-gnu-emacs@gnu.org; Fri, 24 Feb 2023 10:49:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pVaJi-0001ns-0e for bug-gnu-emacs@gnu.org; Fri, 24 Feb 2023 10:49:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 24 Feb 2023 15:49:01 +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.16772537096844 (code B ref 61730); Fri, 24 Feb 2023 15:49:01 +0000 Original-Received: (at 61730) by debbugs.gnu.org; 24 Feb 2023 15:48:29 +0000 Original-Received: from localhost ([127.0.0.1]:37970 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pVaJA-0001mI-Jv for submit@debbugs.gnu.org; Fri, 24 Feb 2023 10:48:28 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:60068) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pVaJ7-0001lW-VK for 61730@debbugs.gnu.org; Fri, 24 Feb 2023 10:48:27 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pVaJ2-0003nF-7T; Fri, 24 Feb 2023 10:48:20 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=Gb3iuN01jgmR/LqGw86Z+uX0KVgKPPVhBrIXXAS2eKU=; b=kJg8TtPTDAb8 jetdxSXgAkfdOD1N5k8UsEUR4zFf56tmKWJdhFFDqvBp8lYsUCjIZDMuAxBePwyBXJqOmURbsWwGu wTg3+klSXGTdGKwX/G7ljkNt8hArxT5RhktZpFiGToHDM3IlBc1BiQ7QmQPzix06Jr1gHza02H4+e aQx6snOWYHvZ3sB/Jv1R10CvmVwCeEgoVOhFwk9+ErSuqqTyxn2ZwxEpQSPv66TbM7DJpurT+m9c/ rir5yICb6sv52x9Cmh4HgjiMYoHGiKe1zvCo1xJmN9i9yN4IJMY7fkyUBQauqDafr3Z6hFdV32GR2 zlN64LLsjl1saRUC1Q8v9A==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pVaIl-00064P-U6; Fri, 24 Feb 2023 10:48:06 -0500 In-Reply-To: <87bkljf4oh.fsf@web.de> (message from Michael Heerdegen on Fri, 24 Feb 2023 16:45:18 +0100) 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:256620 Archived-At: > From: Michael Heerdegen > Cc: mattias.engdegard@gmail.com, 61730@debbugs.gnu.org, > monnier@iro.umontreal.ca > Date: Fri, 24 Feb 2023 16:45:18 +0100 > > Eli Zaretskii writes: > > > Not in my opinion. I'm sick and tired from seeing compilers emitting > > bogus warnings which require one to spend time verifying perfectly > > correct code, or, worse, modify the code to shut up the compiler. Do > > we really want to see stuff like > > > > (setq _ (delq ...)) > > > > in our code? > > That's a bit of an exaggeration: the code would just look like in the > thousands of other cases where we are not sure whether the element to > delete is not at the head, like > > (setq my-list (delq elt my-list)) > > which is not worse, even better readable IMO, than a naked `delq' > call. Even though my-list is never used again in the program? How is this better than "(setq _ ..."? > > If it's really impossible (and I'm not sure it is), then the better > > course of action is to emit the warnings only if the byte compiler was > > requested to be more sensitive to potential issues, similar to GCC's > > "-W*" options. IOW, if someone wants to lint their code, let them ask > > for a linting compilation. > > But I would be okay with that. Great, thanks.