GNU bug report logs - #61730
30.0.50; Compiler warnings for delq and delete

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Severity: wishlist; Reported by: Michael Heerdegen <michael_heerdegen@HIDDEN>; dated Thu, 23 Feb 2023 10:30:01 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.
Severity set to 'wishlist' from 'normal' Request was from Stefan Kangas <stefankangas@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 61730 <at> debbugs.gnu.org:


Received: (at 61730) by debbugs.gnu.org; 1 Jun 2023 00:48:57 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed May 31 20:48:57 2023
Received: from localhost ([127.0.0.1]:36547 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1q4WUr-0004O1-5l
	for submit <at> debbugs.gnu.org; Wed, 31 May 2023 20:48:57 -0400
Received: from mout.web.de ([212.227.15.3]:48953)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <michael_heerdegen@HIDDEN>) id 1q4WUn-0004Ni-KC
 for 61730 <at> debbugs.gnu.org; Wed, 31 May 2023 20:48:55 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de;
 s=s29768273; t=1685580525; x=1686185325; i=michael_heerdegen@HIDDEN;
 bh=kAoVySaIR7XwKfShG8niJDASEMpA5YhvmpKXnsFFX8Y=;
 h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date;
 b=osGLWClw12qHJm1P7GNWUzBJ7BQJfseDlWiQG7UCDPynhJmQ0HFJ/GGnjqQdArwsSZNj2hu
 NDcMdB6o7Qu7UhlsKaiQ1iTrHaRPcob3Pt9bUbIC3s+Wu/np6utfGO2qZH4DXXBdCzOchmNWm
 dQRLz6pu2z9ehVki7SFwEHECU6HrGPiQhtwwPmkXnC1bcagUMCaGbDPUnrVyViWjRm/Xy7W/3
 i1pcqREJMcyGqp3GotqOqMeXVknYnkA6SVrdowigVCHTpDoyx5c2IgPAhZgFOw352wu3wQmrO
 vVxwNXe6lFhAWQOtd4SuKzDPOQXFBrPDuMj9GnpnDjp39KaoaH6A==
X-UI-Sender-Class: 814a7b36-bfc1-4dae-8640-3722d8ec6cd6
Received: from drachen.dragon ([178.14.74.62]) by smtp.web.de (mrweb005
 [213.165.67.108]) with ESMTPSA (Nemesis) id 1MbkSI-1qe7tK3OHe-00dBdt; Thu, 01
 Jun 2023 02:48:44 +0200
From: Michael Heerdegen <michael_heerdegen@HIDDEN>
To: Mattias =?utf-8?Q?Engdeg=C3=A5rd?= <mattias.engdegard@HIDDEN>
Subject: Re: bug#61730: 30.0.50; Compiler warnings for delq and delete
In-Reply-To: <7F5F4F13-5F5F-489C-B64B-790AF0C19953@HIDDEN> ("Mattias
 =?utf-8?Q?Engdeg=C3=A5rd=22's?= message of "Wed, 31 May 2023 16:38:23
 +0200")
References: <CCE0F969-49C2-4F80-B61F-CEA7B34544CB@HIDDEN>
 <FC461D70-310D-4905-A859-1BCD336D9410@HIDDEN>
 <87ednbdatj.fsf@HIDDEN>
 <12EE2A5E-A357-4186-9B81-27A65DE9A3DF@HIDDEN>
 <7F5F4F13-5F5F-489C-B64B-790AF0C19953@HIDDEN>
Date: Thu, 01 Jun 2023 02:48:43 +0200
Message-ID: <874jnst3bo.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Provags-ID: V03:K1:JQKkOvRYCny8hBXa15JJoBS6eHSiRl9dWwS/2R41k/pB3/fQiJV
 Y1UQGM/OtRbFYld9a8Ln/cIITfEaHDCrhFig4x+byNVTMJ7RxPuw5Jx2PR0DVj5neyIZU0V
 iqIoTDoLqPOXJJKLRFm5SSG+qOoiAIMYy2+fn6nIaRF53LX43mRfaSrYPXT9ouXEUUa7Dy2
 +G6cvY8bTmYVnFN3OOSEg==
X-Spam-Flag: NO
UI-OutboundReport: notjunk:1;M01:P0:tjDsZ+JUp3I=;GVp09aY43SPPVHgB5pEBQXqDjoc
 YzrdLsYr8zpLsPK6oBDGOttfjIoR6jD3lGd5ROOrGCIeeOZ1aFUbq/wEFUCX7e2Uy271YpMV6
 2YOQ5vaJZjFfcCB1tYNd07eeZRfmQ7VI9/e955DLsruQMfYIUs5zUlefkatH6XY7EnT60C6jg
 SjGP8TC76ZFOJsPf1liqfeqRKZ0wdcw5JmlJpG5jc9AOR4wCKmg6GTCH76VYG/cF19bNuRo1A
 j2EFP9Q0GUqCI2Ozc8JhsuR1SybofwcEDxDcUcI2qiNnphGaKuOgCjHUXA4MGHG6dG+YCUtXG
 aIRi7vzGZCjgyCi3+IGhauV433HkdRHnFfBOnakJUPVB2Veee1NHrcJErfcoS3yCODU5se8ZL
 Te3BYeNcjxxGaTcgmMteOqKRn0tGuLBJZTctrnhG55mW7IuargWNZLdlp5eznI6TMGO61aE2a
 YmV6K5Zy40VXZx8Xknsz0+KfjObNsNgGR98MgZuL6IoFRxrUPmjr16JtfKBPVF3Yjx3rsdtbS
 01OhhLnu9iw0gedWilVYtZhSoDSOls3cweGVSiejaeJHuXjEi+G9FS/mlhuqbZoUboP/HaV9f
 2n6lkRcPYR48o7MGs2FvhYlF4eJOUMp7JuCwTrqZeR8PMbwUrgCVQ3H/ZcoFfLPOVBNQLI2aK
 mS0GogmdB2vviezavONFsJGh9miTHaLUhMLMjTEUmhpt/DCoO4KAtzRc5n6iUhrj9SBXBadMJ
 oPb1r59pzvWdnmSh2V5IhZQhMm0/QyRmhOzCQSyTrmfjKor4kYo816ubqCn+4IlvRiwViSREb
 FalURJj3kTZsWswlNIqMwjT0oKXdiwrswXqOgdzP23MFABKdZKL9AqhCJGwnsKeeRLureUoZe
 7qeAFHvI4wDtwfGKxHELc0bTaCVcfcrmSxG7bRhucEVuNIq1ULaUlSUjD2nLbHuxAXUFPob3F
 hrjnhA==
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 61730
Cc: 61730 <at> debbugs.gnu.org, Stefan Monnier <monnier@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Mattias Engdeg=C3=A5rd <mattias.engdegard@HIDDEN> writes:

> Except for the ones in Org, these are probably false positives
> (although I'm not sure about all of them). I could go around wrapping
> them in (ignore ...) to make the warnings go away but I don't want to
> do that unless I can vouch for them being false positives and explain
> why.
>
> So I'm going to disable the warning for `delq` and `delete` again,
> because seeing those warnings at every build is not an option and they
> aren't going away by themselves. (Sorry, Michael!)

It's fine.  I didn't expect a significant number of false positives, but
if there is, we shouldn't keep the warning.

Thanks for your work here.

Michael.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#61730; Package emacs. Full text available.

Message received at 61730 <at> debbugs.gnu.org:


Received: (at 61730) by debbugs.gnu.org; 31 May 2023 14:38:36 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed May 31 10:38:36 2023
Received: from localhost ([127.0.0.1]:36152 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1q4MyC-0002SA-5M
	for submit <at> debbugs.gnu.org; Wed, 31 May 2023 10:38:36 -0400
Received: from mail-lj1-f170.google.com ([209.85.208.170]:44410)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <mattias.engdegard@HIDDEN>) id 1q4My7-0002Ru-Du
 for 61730 <at> debbugs.gnu.org; Wed, 31 May 2023 10:38:34 -0400
Received: by mail-lj1-f170.google.com with SMTP id
 38308e7fff4ca-2af29b37bd7so64898171fa.1
 for <61730 <at> debbugs.gnu.org>; Wed, 31 May 2023 07:38:31 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20221208; t=1685543905; x=1688135905;
 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=BOzw66h5i1Lz8YSki48CUgWR/7RR/hErcmuRmr765d0=;
 b=gKx1qAYBYRVZMkbjOrBw4tpCgs6YsTdAfACn7gZ4iIVaaHys5v7hlv4HG7e1uKy26C
 EXhwqvd1p7argeJf9agmIB01bLDv1d+Que4s5Y5pF23VO1BqNEu6Fi+QtQv6HCMlVcAg
 kD1OTnuli0XIpM8xPkQ1eCzav3BWYeJWOFEhCpyf/1j00MwcnIuCk2xYIWS/8jHFtWLp
 mOyGYbnLYWgcs3tI+eV02eDEVi1s3szaetwo2Rijny0+7LkQBZgJwcr+nI4TxtbGV23N
 YKS81WTQWKlNZ0KLHtqA7fGE1s5rHa+Xg/D2I0s01CU2rd673VdnWC8vGYvCyR6fOrMu
 /Q8w==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20221208; t=1685543905; x=1688135905;
 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=BOzw66h5i1Lz8YSki48CUgWR/7RR/hErcmuRmr765d0=;
 b=jj6O9Cpi1WY6KJhvXQf07dcRJ2pZ5xp6aYZxUcK9r77zgVZIRi+P/bt+OvN8dUKXN0
 g0uSLugDwWRRMsSnSYFL/crjBkq+G0rRlhtWJmgpDnET4hUj8+pyanPBl6jacpKrMUoD
 ZyQ1DuqvsTIgaunSIM8ozkxf4xAghkuJbm8EDI6sfGY9hOlMEaaLagsAVq1FSj9+u6Ic
 yZbEzRixs4qBw6NV9YiYxOg9n9eW2Sy2ilYKlRQ1I8rPJHJ0HJtbSvbzWQW03rirxN8I
 h8OAFw5WOojZxwiAr5IjS+4dkNEiwGRCOgLleeiO+SFtafPxhekZL5I/pwcNAFzWso0o
 Mf1w==
X-Gm-Message-State: AC+VfDzAhOfAT9U4Cpni8NOcCCMFdhMQRlfZSifLJ9tpK16cKZvJYk58
 p8QED7zrijxmC6j0LBj5GrM=
X-Google-Smtp-Source: ACHHUZ4kSj8OH5jD26UYHIePLttVx2xOD9+MQk2yEy5FyWaT9KcuYY317CE6pNrNzTgg80wEQbAXYw==
X-Received: by 2002:a2e:8891:0:b0:2a8:e7f9:c33f with SMTP id
 k17-20020a2e8891000000b002a8e7f9c33fmr3146513lji.30.1685543905135; 
 Wed, 31 May 2023 07:38:25 -0700 (PDT)
Received: from smtpclient.apple (c188-150-165-235.bredband.tele2.se.
 [188.150.165.235]) by smtp.gmail.com with ESMTPSA id
 w26-20020a05651c103a00b002ad988efd73sm3368421ljm.14.2023.05.31.07.38.24
 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128);
 Wed, 31 May 2023 07:38:24 -0700 (PDT)
Content-Type: text/plain;
	charset=utf-8
Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.15\))
Subject: Re: bug#61730: 30.0.50; Compiler warnings for delq and delete
From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= <mattias.engdegard@HIDDEN>
In-Reply-To: <12EE2A5E-A357-4186-9B81-27A65DE9A3DF@HIDDEN>
Date: Wed, 31 May 2023 16:38:23 +0200
Content-Transfer-Encoding: quoted-printable
Message-Id: <7F5F4F13-5F5F-489C-B64B-790AF0C19953@HIDDEN>
References: <CCE0F969-49C2-4F80-B61F-CEA7B34544CB@HIDDEN>
 <FC461D70-310D-4905-A859-1BCD336D9410@HIDDEN> <87ednbdatj.fsf@HIDDEN>
 <12EE2A5E-A357-4186-9B81-27A65DE9A3DF@HIDDEN>
To: Michael Heerdegen <michael_heerdegen@HIDDEN>
X-Mailer: Apple Mail (2.3654.120.0.1.15)
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 61730
Cc: 61730 <at> debbugs.gnu.org, Stefan Monnier <monnier@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

20 maj 2023 kl. 11.14 skrev Mattias Engdeg=C3=A5rd =
<mattias.engdegard@HIDDEN>:

> I changed a few spots of murky code that were nevertheless probably =
(?) false positives, so that the result is unequivocally better or at =
least no worse, in 0de472e04f.
>=20
> Some of the remaining warnings point to what appear to be clear bugs. =
Those should be fixed no matter what.

The truly bad ones have been fixed, but warnings remain in:

lisp/mouse.el:2772:10
lisp/dom.el:165:8
lisp/emacs-lisp/package.el:2556:15
lisp/gnus/gnus-art.el:6489:14
lisp/gnus/gnus-art.el:6500:12
lisp/gnus/gnus-cus.el:414:14
lisp/gnus/gnus-topic.el:328:14
lisp/gnus/gnus-sum.el:4656:12
lisp/net/newst-treeview.el:1835:17
lisp/org/ob-lua.el:388:19
lisp/org/ob-ruby.el:239:13
lisp/org/ob-ruby.el:261:10
lisp/use-package/bind-key.el:254:8

Except for the ones in Org, these are probably false positives (although =
I'm not sure about all of them). I could go around wrapping them in =
(ignore ...) to make the warnings go away but I don't want to do that =
unless I can vouch for them being false positives and explain why.

So I'm going to disable the warning for `delq` and `delete` again, =
because seeing those warnings at every build is not an option and they =
aren't going away by themselves. (Sorry, Michael!)

(The ones in Org have nothing to do with delq and delete per se and are =
easy to silence but given that the warning is going away I won't =
bother.)





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#61730; Package emacs. Full text available.

Message received at 61730 <at> debbugs.gnu.org:


Received: (at 61730) by debbugs.gnu.org; 21 May 2023 08:42:42 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun May 21 04:42:42 2023
Received: from localhost ([127.0.0.1]:59996 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1q0eeI-0002ob-2E
	for submit <at> debbugs.gnu.org; Sun, 21 May 2023 04:42:42 -0400
Received: from mail-lf1-f53.google.com ([209.85.167.53]:47122)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <mattias.engdegard@HIDDEN>) id 1q0eeE-0002oK-40
 for 61730 <at> debbugs.gnu.org; Sun, 21 May 2023 04:42:40 -0400
Received: by mail-lf1-f53.google.com with SMTP id
 2adb3069b0e04-4f3af4295ddso2315675e87.2
 for <61730 <at> debbugs.gnu.org>; Sun, 21 May 2023 01:42:38 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20221208; t=1684658552; x=1687250552;
 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=jmxcolUvDf4oMe0sxxZJj9K+IVfbfo2xzCP1fNxUZ24=;
 b=gqadHfhFXFoi43AbbaYg98NX38yUkUr9FppgUhwr0vw0iZM/FG/hhemSKOBk0pbmXs
 CZtrwcS5iPFfl05Hx+147lbFuoM2wF21PW4qnKZk962tWtPWp3gwaoiiCQb0VAEDt3pb
 bAdb5T63LEDmSK+7QvnLjFXwFNX3grT/XyD/7XO1USWmJcxq59aFA7DNE6M1qUFb9Juy
 TNho3GOXeLuEafH/oSp9V1xo2rCTZBC7bLsXKd0AuC36Uop/ovQ+Tk0A0vfV840uL7hu
 hAaRYICzfYhkNiHdIGG2MTS8jMF/zum/C229CQIELbYi+rcGiBfD92ImDOtNMGH68YcU
 7dLw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20221208; t=1684658552; x=1687250552;
 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=jmxcolUvDf4oMe0sxxZJj9K+IVfbfo2xzCP1fNxUZ24=;
 b=RqopdPxTDgf2ZVq8ZtKSkezxFnnpaTr4ENCJJ+mMCPZGQYYymVr/yq0JUUJuPgNJAG
 Mk7bSw5WgmcP+/tAn6qi/tYfJKhewkRoWmdUuau21feR1YBXwCE5k4ksgLtkdJTRZb0R
 /MpyI5vehMy4meSoo6MTGo0oz6GB6wB8GnkC+ZmvlxIo1NMIttfzgH8XN2YKgcmpypsU
 79wYD6c6n6g7iyGXvoP+DYfzxDTjsVoD6BbKaUYbCal/65Jb2JGVj1v8tue/2Disq9mH
 I3MZlqo54gC2S+ytbdWuHKMPRVSXA5FMrkYkFnScu3PZHZZvCYO4VjI0zdTF3Ai6oDYO
 CyOA==
X-Gm-Message-State: AC+VfDwr5R2RftLjJREeSPp0y0LEB6rNpoGB0kroXHZh3L2AXm1M6TRf
 OALCes+l+C5aWsHT/LDKEN8=
X-Google-Smtp-Source: ACHHUZ7GJZwlYzygXSkOMh5es6u62P23SyYNOIofbpu+8ne3zk1YgfrS+5PIr3e2JZk7Uy9p2BNF/A==
X-Received: by 2002:ac2:5973:0:b0:4f3:98b4:e45a with SMTP id
 h19-20020ac25973000000b004f398b4e45amr2275386lfp.21.1684658551740; 
 Sun, 21 May 2023 01:42:31 -0700 (PDT)
Received: from smtpclient.apple (c188-150-165-235.bredband.tele2.se.
 [188.150.165.235]) by smtp.gmail.com with ESMTPSA id
 v3-20020ac25603000000b004f138c4de81sm546886lfd.149.2023.05.21.01.42.30
 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128);
 Sun, 21 May 2023 01:42:31 -0700 (PDT)
Content-Type: text/plain;
	charset=us-ascii
Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.15\))
Subject: Re: bug#61730: 30.0.50; Compiler warnings for delq and delete
From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= <mattias.engdegard@HIDDEN>
In-Reply-To: <87ttw6xrno.fsf@HIDDEN>
Date: Sun, 21 May 2023 10:42:30 +0200
Content-Transfer-Encoding: quoted-printable
Message-Id: <45A710C9-FE43-4647-A31D-8B4CE533D6D0@HIDDEN>
References: <CCE0F969-49C2-4F80-B61F-CEA7B34544CB@HIDDEN>
 <FC461D70-310D-4905-A859-1BCD336D9410@HIDDEN> <87ednbdatj.fsf@HIDDEN>
 <12EE2A5E-A357-4186-9B81-27A65DE9A3DF@HIDDEN> <874jo6cxim.fsf@HIDDEN>
 <sdvbkietmjs.fsf@HIDDEN> <87ttw6xrno.fsf@HIDDEN>
To: Michael Heerdegen <michael_heerdegen@HIDDEN>
X-Mailer: Apple Mail (2.3654.120.0.1.15)
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 61730
Cc: Ruijie Yu <ruijie@HIDDEN>, Eli Zaretskii <eliz@HIDDEN>,
 61730 <at> debbugs.gnu.org, Stefan Monnier <monnier@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

21 maj 2023 kl. 05.57 skrev Michael Heerdegen =
<michael_heerdegen@HIDDEN>:

>> Maybe we can take inspirations from other langagues?  In rust we have
>> the `#[must_use]' attribute [1], and in C++17 and C23 we have the
>> `[[nodiscard]]' attribute [2] [3].
>=20
> These are not bad.  I like "nodiscard".

There are probably better names than the chosen one but I went back and =
forth on it for a while so we should let it sink in for a bit before =
switching again. There is still some time before the release of Emacs =
30.

>> Also, is there any definitive relation between this
>> 'important-return-value property and the existing "pure" function
>> declaration?  Like the `(declare (pure t))' thing in the front of a
>> defun.
>=20
> Interesting question.  Does 'pure' (or 'side-effect-free') imply
> 'important-return-value'?

Not `pure`, but (almost) all functions declared `pure` are also =
`side-effect-free` (possibly error-free).

`side-effect-free` often produces the same warning as =
`important-return-value` for calls that don't use the return value, but =
the entire call can be deleted silently under some circumstances.


21 maj 2023 kl. 07.55 skrev Eli Zaretskii <eliz@HIDDEN>:

> no-discard-value, I hope.  Just "nodiscard" is too terse (discard
> what?).

I agree, we should prefer more descriptive names. Let's see what we can =
come up with.





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#61730; Package emacs. Full text available.

Message received at 61730 <at> debbugs.gnu.org:


Received: (at 61730) by debbugs.gnu.org; 21 May 2023 05:55:47 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun May 21 01:55:47 2023
Received: from localhost ([127.0.0.1]:59884 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1q0c2l-0006cC-Ey
	for submit <at> debbugs.gnu.org; Sun, 21 May 2023 01:55:47 -0400
Received: from eggs.gnu.org ([209.51.188.92]:49982)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1q0c2h-0006bs-IX
 for 61730 <at> debbugs.gnu.org; Sun, 21 May 2023 01:55:46 -0400
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 <eliz@HIDDEN>)
 id 1q0c2b-0004vl-43; Sun, 21 May 2023 01:55:37 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From:
 Date; bh=kTqXJ17CXDf5aOeUNG0U2RJF7BknlbnrsKlRD6Yg6hs=; b=CT55ASA85Zj1WNJf3cjP
 2oUg+jPVc+E7TXhlAKlJHPwMkZ/nfBk/tzpi7LsVQ1kBjuKGMMcsNLbdlnBWnKo3vwczDKie5kNr4
 yqtAMa3aRBLsDNngNvHISm+NoxxO/wflPJVPEmvVtxEEH9Rw/mRm36CKNo15UJIFiOpBoaqzFEldn
 Nt7212Hh4i9lwM/+RCgppFejbkgojzkIdKnEdJ6JXSICk/rMCLPzgCDx4c9QjyryoFa81F1JT+2dH
 UO6RKxmvrT0MyX2+JvtcsrPq573sYRNqOzJS6ovlqSTXx3HqJB6Pm9kDIs1Nzak3BN/JnvJJzvPYB
 jnoOrTgZMl8LyQ==;
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 <eliz@HIDDEN>)
 id 1q0c2Z-0002BE-Fg; Sun, 21 May 2023 01:55:36 -0400
Date: Sun, 21 May 2023 08:55:54 +0300
Message-Id: <83353qrzx1.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Michael Heerdegen <michael_heerdegen@HIDDEN>
In-Reply-To: <87ttw6xrno.fsf@HIDDEN> (message from Michael Heerdegen on Sun,
 21 May 2023 05:57:47 +0200)
Subject: Re: bug#61730: 30.0.50; Compiler warnings for delq and delete
References: <CCE0F969-49C2-4F80-B61F-CEA7B34544CB@HIDDEN>
 <FC461D70-310D-4905-A859-1BCD336D9410@HIDDEN>
 <87ednbdatj.fsf@HIDDEN>
 <12EE2A5E-A357-4186-9B81-27A65DE9A3DF@HIDDEN>
 <874jo6cxim.fsf@HIDDEN> <sdvbkietmjs.fsf@HIDDEN> <87ttw6xrno.fsf@HIDDEN>
MIME-version: 1.0
Content-type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 61730
Cc: ruijie@HIDDEN, mattias.engdegard@HIDDEN, 61730 <at> debbugs.gnu.org,
 monnier@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Cc: Mattias EngdegŚrd <mattias.engdegard@HIDDEN>,
>  61730 <at> debbugs.gnu.org, Stefan Monnier <monnier@HIDDEN>
> From: Michael Heerdegen <michael_heerdegen@HIDDEN>
> Date: Sun, 21 May 2023 05:57:47 +0200
> 
> Ruijie Yu <ruijie@HIDDEN> writes:
> 
> > Maybe we can take inspirations from other langagues?  In rust we have
> > the `#[must_use]' attribute [1], and in C++17 and C23 we have the
> > `[[nodiscard]]' attribute [2] [3].
> 
> These are not bad.  I like "nodiscard".

no-discard-value, I hope.  Just "nodiscard" is too terse (discard
what?).




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#61730; Package emacs. Full text available.

Message received at 61730 <at> debbugs.gnu.org:


Received: (at 61730) by debbugs.gnu.org; 21 May 2023 03:58:03 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat May 20 23:58:03 2023
Received: from localhost ([127.0.0.1]:59796 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1q0aCp-0002ka-7Y
	for submit <at> debbugs.gnu.org; Sat, 20 May 2023 23:58:03 -0400
Received: from mout.web.de ([212.227.15.3]:33487)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <michael_heerdegen@HIDDEN>) id 1q0aCk-0002jy-J5
 for 61730 <at> debbugs.gnu.org; Sat, 20 May 2023 23:58:02 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=s29768273;
 t=1684641469; i=michael_heerdegen@HIDDEN;
 bh=9rkwE9rtWr7u7o2NFTjh7L9//IyAOcFoqTfUfKGQR2U=;
 h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date;
 b=V+pFBwOgW4In+cUYgbJhutoXAwl2MzH6yerIWqnVdPyO4hzL4TQ8JMQ4lXplMX0Ys
 LWwymIMtw5FwLNMz9APOuUKE1/RWlfPRDjwp0aPHbdYK5XKZU6+Ohlx9hu1MQPi+PY
 9N0pCQ0y2S+H8KWjcBDH0A2Cd1d9CZ+HZHSxCilsQM8tE5CF3Wmqz+Astpd0vkQUwS
 EVcphnQaTymosER0wZh3TxH5lJX1katxgmzTmnETfH4VsTjnfTgpOyQsuBjRQHlfS6
 KXNLqT7ta2bEpsodWreqUgO/EWyeHg1YPqkNMo/8cyvzxQ9x1o2F1oXJWCPGhyH82f
 5dww6P7xHQCIg==
X-UI-Sender-Class: 814a7b36-bfc1-4dae-8640-3722d8ec6cd6
Received: from drachen.dragon ([178.14.74.62]) by smtp.web.de (mrweb005
 [213.165.67.108]) with ESMTPSA (Nemesis) id 1MT7aV-1pZSxW0L0R-00UbAJ; Sun, 21
 May 2023 05:57:49 +0200
From: Michael Heerdegen <michael_heerdegen@HIDDEN>
To: Ruijie Yu <ruijie@HIDDEN>
Subject: Re: bug#61730: 30.0.50; Compiler warnings for delq and delete
In-Reply-To: <sdvbkietmjs.fsf@HIDDEN> (Ruijie Yu's message of "Sun, 21 May
 2023 11:01:43 +0800")
References: <CCE0F969-49C2-4F80-B61F-CEA7B34544CB@HIDDEN>
 <FC461D70-310D-4905-A859-1BCD336D9410@HIDDEN>
 <87ednbdatj.fsf@HIDDEN>
 <12EE2A5E-A357-4186-9B81-27A65DE9A3DF@HIDDEN>
 <874jo6cxim.fsf@HIDDEN> <sdvbkietmjs.fsf@HIDDEN>
Date: Sun, 21 May 2023 05:57:47 +0200
Message-ID: <87ttw6xrno.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-Provags-ID: V03:K1:jmfSPVcWSnHo3glACIaCclyPG9a9OqWLAfXSZgPJkSpR5m4Ot9x
 KSXtAGe9jg8iSjBC7YvXMs2qJ/xgVZ97qUudHy9iSHIdJIZzVOXeSy4373dnfyKxL8d4EVi
 ywepgnovQKX9+awrznV1FReYtLlFCGKuO1yv+kJ6mATFAeM/4Pvq/t/6ulMFJOKewTos4Nc
 AM/GbvL4VY/wgSDBv6W5w==
X-Spam-Flag: NO
UI-OutboundReport: notjunk:1;M01:P0:2qItP3Y9fqo=;MpiD1Zjlt9m3PeqZ0XwtpPBs/St
 N0jzVCKQ/HnMbiQcJ3hUjgfDSmRZK/5u23EhaflUxYU2y3LOJ99GDuQrvu2dRbek5gTCBiRuP
 hYskFK1m2kqXl4hmPkBpHv7YcYxJVO7qXc9uouJNjnbVUnEe4Iyd34GcWxm60A+sZ+kDGjxUf
 WJ7fjSjAq5qc3efV5RN/EHUDG+MwYHdtZM5QFRaYUFkpQo3X3RUkGNWItezzjGfXZHlhCKB6F
 3KCbIJZipkpTlkTHIvxTBJ6egj41eiYVKRNYZm/Zx+Jb2LoyyV9rUZafwjfXpN/In72rtueIu
 yUgRxrZWNAnkDQJfu6FFpSzfXmjeq41kYovR4FFvdE71sa93quNcZEO2tRf3ryg5UpCDDptDQ
 WmVm+4uRU0Ci6L0ya5huqr8H9SOKSjE5Nl0tlpqzVGDw2OXYKFUPO2Jf71NeQ4wZWGYGd2Thf
 8hqS9gbUtVxVTugLyH89biPXNOvcJnL4Jof89L14HDIuqKkmwB1aQQkbCzS7bMcyGR1Ty6R+O
 n8PXC+bssV6rClm6/creYBOuG3CWA5Uf9iHs0S9rLXJsGEbSsWXa6vkyw5WlNHfh0pbJMvplV
 soxckcw+1XAtCQfYRv/Pr1mYhUB4K6NsePBSr7m9uMXNsct10esN2FXtoUgE+v4xzwjCocnm5
 6l+NlGnAgSJcFD/thku3QSHosKylE9KyO/qfdYV1L7Gk7URCj0Hu3xZKsBCRTIWGzWTNx1zRi
 QCSZJXrrUmv0KrV8ythDckrXHjkA7aj9+sOpr0q8mPEfO7E5N/XDt/PHsscIg92+zqJqkOK5o
 3V8/u6so+zejhQEApykOZJKJj87BZ8FikkTP3jly5bLR8u9imD+hCqLyjxJa+rufsoNN0qNTC
 Dge8zHKt8TQj5jaoc12QtH7tlSp4zajA4xvGl17Hkcrmt4nU9phwL/RrhaoeUar/dCI8vSKlA
 BuNwww==
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 61730
Cc: Mattias =?utf-8?Q?Engdeg=C3=A5rd?= <mattias.engdegard@HIDDEN>,
 61730 <at> debbugs.gnu.org, Stefan Monnier <monnier@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Ruijie Yu <ruijie@HIDDEN> writes:

> Maybe we can take inspirations from other langagues?  In rust we have
> the `#[must_use]' attribute [1], and in C++17 and C23 we have the
> `[[nodiscard]]' attribute [2] [3].

These are not bad.  I like "nodiscard".

> Also, is there any definitive relation between this
> 'important-return-value property and the existing "pure" function
> declaration?  Like the `(declare (pure t))' thing in the front of a
> defun.

Interesting question.  Does 'pure' (or 'side-effect-free') imply
'important-return-value'?

Michael.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#61730; Package emacs. Full text available.

Message received at 61730 <at> debbugs.gnu.org:


Received: (at 61730) by debbugs.gnu.org; 21 May 2023 03:02:05 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat May 20 23:02:05 2023
Received: from localhost ([127.0.0.1]:59732 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1q0ZKf-00016N-0N
	for submit <at> debbugs.gnu.org; Sat, 20 May 2023 23:02:05 -0400
Received: from netyu.xyz ([152.44.41.246]:33404 helo=mail.netyu.xyz)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ruijie@HIDDEN>) id 1q0ZKb-00015m-6Q
 for 61730 <at> debbugs.gnu.org; Sat, 20 May 2023 23:02:03 -0400
Received: from fw.net.yu.netyu.xyz (<unknown> [222.248.4.98])
 by netyu.xyz (OpenSMTPD) with ESMTPSA id b06268b7
 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); 
 Sun, 21 May 2023 03:01:59 +0000 (UTC)
References: <CCE0F969-49C2-4F80-B61F-CEA7B34544CB@HIDDEN>
 <FC461D70-310D-4905-A859-1BCD336D9410@HIDDEN> <87ednbdatj.fsf@HIDDEN>
 <12EE2A5E-A357-4186-9B81-27A65DE9A3DF@HIDDEN> <874jo6cxim.fsf@HIDDEN>
User-agent: mu4e 1.11.3; emacs 30.0.50
From: Ruijie Yu <ruijie@HIDDEN>
To: Michael Heerdegen <michael_heerdegen@HIDDEN>
Subject: Re: bug#61730: 30.0.50; Compiler warnings for delq and delete
In-reply-to: <874jo6cxim.fsf@HIDDEN>
Date: Sun, 21 May 2023 11:01:43 +0800
Message-ID: <sdvbkietmjs.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 61730
Cc: Mattias =?utf-8?Q?Engdeg=C3=A5rd?= <mattias.engdegard@HIDDEN>,
 61730 <at> debbugs.gnu.org, Stefan Monnier <monnier@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.0 (/)


Michael Heerdegen <michael_heerdegen@HIDDEN> writes:

> I have some doubt about the new property's name
> "important-return-value".  It's not bad but it also doesn't really tell
> what the warnings are about.  My English is not good enough to come up
> with something better though ... "enforce-retval-passing"...hmm,
> probably not.

Maybe we can take inspirations from other langagues?  In rust we have
the `#[must_use]' attribute [1], and in C++17 and C23 we have the
`[[nodiscard]]' attribute [2] [3].

Also, is there any definitive relation between this
'important-return-value property and the existing "pure" function
declaration?  Like the `(declare (pure t))' thing in the front of a
defun.

[1]: https://doc.rust-lang.org/reference/attributes/diagnostics.html#the-must_use-attribute
[2]: https://en.cppreference.com/w/cpp/language/attributes/nodiscard
[3]: https://en.cppreference.com/w/c/language/attributes/nodiscard

-- 
Best,


RY




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#61730; Package emacs. Full text available.

Message received at 61730 <at> debbugs.gnu.org:


Received: (at 61730) by debbugs.gnu.org; 21 May 2023 00:57:05 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat May 20 20:57:05 2023
Received: from localhost ([127.0.0.1]:59671 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1q0XNh-00060W-Il
	for submit <at> debbugs.gnu.org; Sat, 20 May 2023 20:57:05 -0400
Received: from mout.web.de ([212.227.17.11]:41359)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <michael_heerdegen@HIDDEN>) id 1q0XNb-0005zw-TO
 for 61730 <at> debbugs.gnu.org; Sat, 20 May 2023 20:57:04 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=s29768273;
 t=1684630610; i=michael_heerdegen@HIDDEN;
 bh=e1viDZPfbc8wNSLk1WZkCLz8ZESvTXhMdQTvIlytuns=;
 h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date;
 b=VdpWxC4Lpt9PKtG9T48wql+XLyaxBJsb9SjgeHSXSV8z/6IzDD2TzKQ/sJxglgnsj
 yeFIGKQvZBpfX1ySIYt6+AxWcAXhngapFaDgjSv9/pamN3pHlJXvZ5IGYsNK2dOw0+
 mcdsLXhRbQK4BcPmE3Cz73nU4A3D8QkQfhayWh5A9bzmvJ/PD2zCv+iQRRaZQG3V0f
 covABo+filZzq8qgU4ISvXuCe/DjCgKkJ0b4x0RhIsnLoKJ0izA9+waA8xARjmvaO5
 9m7R+TXT8jyRzbd5PIkQJGqLHLE2nYf1CFOz9vg3xQ+OL5TsrupYVrx9ZHBagNdCmh
 ZRfsNhw8/XLWg==
X-UI-Sender-Class: 814a7b36-bfc1-4dae-8640-3722d8ec6cd6
Received: from drachen.dragon ([178.14.74.62]) by smtp.web.de (mrweb105
 [213.165.67.124]) with ESMTPSA (Nemesis) id 1MlsOP-1qRJkv2nOV-00irh1; Sun, 21
 May 2023 02:56:50 +0200
From: Michael Heerdegen <michael_heerdegen@HIDDEN>
To: Mattias =?utf-8?Q?Engdeg=C3=A5rd?= <mattias.engdegard@HIDDEN>
Subject: Re: bug#61730: 30.0.50; Compiler warnings for delq and delete
In-Reply-To: <12EE2A5E-A357-4186-9B81-27A65DE9A3DF@HIDDEN> ("Mattias
 =?utf-8?Q?Engdeg=C3=A5rd=22's?= message of "Sat, 20 May 2023 11:14:13
 +0200")
References: <CCE0F969-49C2-4F80-B61F-CEA7B34544CB@HIDDEN>
 <FC461D70-310D-4905-A859-1BCD336D9410@HIDDEN>
 <87ednbdatj.fsf@HIDDEN>
 <12EE2A5E-A357-4186-9B81-27A65DE9A3DF@HIDDEN>
Date: Sun, 21 May 2023 02:56:49 +0200
Message-ID: <874jo6cxim.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Provags-ID: V03:K1:t3JjCjDGu91Rt5if4p1taz49mxV2KLkxPfIhGgSCyVuqgPuWHZM
 81WBEVRwXBvlabNZz7hwSpN7a2eRqV+VUes+3oGo9HlvWOJzC1siHAc53m3NbSJdoTsFgBi
 Nz/ZfLIWe08Roq6ETAW0OXytZz+KVNOJ36a8qhiW0KNSTf2EddaMy3qgGRdACEgPqqERsuv
 Z39Aae3kx6RiDVYqpNXpw==
X-Spam-Flag: NO
UI-OutboundReport: notjunk:1;M01:P0:5n45UYC57bg=;wECggLwkpwRafLkqGY7z03vUyNq
 SsNuVGWWPYRZqub3LYm6zizIoFXz3S8oY57ADmH8ur68wefpiq/851k0wG4cjTVxtfP5Sroia
 MlM7TkbeVYrYyL44Kz27V82bCnXL6cCBDweeHaddChdvVjBA4YpFBHyS4k8WsZW/JfOq5xd/P
 g/dfgTNfv83I6Oyr/82LzOGxPJZxmrr5yfvBNNfFbZtF8glCgx5h7eFTZPHlku0O8wWEsfd3c
 EJfWzrdEe6YbPef8l8qJ+ntHmIYer2xIh919AGjGl5+lAl7/S5l0ySXXqQ/n39ncUSwaq+AMS
 xHwwvn4cOFXw6W2QDZ8B8yt1As7E3x8drqXPAkXh4hYlQSdsmtcQoThhCwnVcGbcPzpdHQ3yw
 LQZ55yKIOGXX/JchnhOvvKU855nXOVaO2Yny2Cnm3guzlYDFklX05+bhIujsX8MtfMeE+spFI
 EPDEE42a/W0qHjBthT6TIyYQjjG551fTZseFVME/w9cviDqPHaJkvXv/B/iUNGVYsyqcuSQV6
 t6DbNSzGHePI6R9DuNDriGhMlcvEFaZgg6au8L5lkPdOqbh6UAg11fHcMwc7MrG6ERDtTBPwK
 PrKs3BsCLQJkS8cghG6isLV8qd+xdK0i7+9VyHF5tMu3IQKuFF0kowe4TWzpdu/SpaK48Y3ZZ
 o7ltmafUVAb/geMf4lBizI1Ag/kCBXVn73TWgfH+x/WwXQkqjHpKnZ20ZWwoKAPJeXKW8D1yF
 aZo7B+gDiyI6pM4nbT124QSVdv0YUX7TaQzUb/BES86YXP8OvC7uIMBsZKhKj4IrLKo+4igCz
 d8FFhzLFv4LbXQ61E2UAz90ZTLIjfX/vLD72CnPqCS1NdrBsohFNQIWxHTZoQfkN4yfsFxXrw
 JuOX+xNAjCMmojIy5x7cgvRppEy/aB1JTID5FypSer7ONyTZxgajDOH9zZR3Iw0yU+dOiCRlM
 9qMoP1hNJ6gK87xEskETyYpme/4=
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 61730
Cc: 61730 <at> debbugs.gnu.org, Stefan Monnier <monnier@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Mattias Engdeg=C3=A5rd <mattias.engdegard@HIDDEN> writes:

> > Let's see if there is more outcome.
>
> I changed a few spots of murky code that were nevertheless probably
> (?) false positives, so that the result is unequivocally better or at
> least no worse, in 0de472e04f.
>
> Some of the remaining warnings point to what appear to be clear
> bugs. Those should be fixed no matter what.

Thanks.  So it was worth it.

I have some doubt about the new property's name
"important-return-value".  It's not bad but it also doesn't really tell
what the warnings are about.  My English is not good enough to come up
with something better though ... "enforce-retval-passing"...hmm,
probably not.

Michael.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#61730; Package emacs. Full text available.

Message received at 61730 <at> debbugs.gnu.org:


Received: (at 61730) by debbugs.gnu.org; 20 May 2023 09:14:24 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat May 20 05:14:24 2023
Received: from localhost ([127.0.0.1]:57865 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1q0IfP-00038N-SM
	for submit <at> debbugs.gnu.org; Sat, 20 May 2023 05:14:24 -0400
Received: from mail-lf1-f42.google.com ([209.85.167.42]:46362)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <mattias.engdegard@HIDDEN>) id 1q0IfN-000389-3s
 for 61730 <at> debbugs.gnu.org; Sat, 20 May 2023 05:14:22 -0400
Received: by mail-lf1-f42.google.com with SMTP id
 2adb3069b0e04-4f3b314b1d7so1055351e87.1
 for <61730 <at> debbugs.gnu.org>; Sat, 20 May 2023 02:14:21 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20221208; t=1684574055; x=1687166055;
 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=txeDQNGG7pu0TLYUhPeR8Jqk+BWCqa2Ed/c3EGC6xrU=;
 b=dzUPjlMzGnSqeVT/fxjewv0GUtSjsg0qO9/XASP42SUgD5zO5DzhcDSpeOCVYUIGRa
 McIHgO0V3M+1X+Kxt2hB4GHBSpjCFpJ67XWF3Z2A1Hv127FqTU6C9x2PIJ20X53goOCO
 rFrlIjc2Tiuo+zkIABmmjG1BYOKOTtf9lnx8DH1o7z3YpgppXox2dSZQlyaknToDYXVw
 FXR5Hh10YpzLPqMQbaE38ZFqrGCD4GiCOSdN42gQh/cS7eTiM3S/yDjdPxtlMjInQdJx
 cJBHNwjGnYk/EkmnxHBjGTIHkMdk3pa9g9CMnL782fP0UZUfblZelsdNhCJsoN7q50Rj
 78qg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20221208; t=1684574055; x=1687166055;
 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=txeDQNGG7pu0TLYUhPeR8Jqk+BWCqa2Ed/c3EGC6xrU=;
 b=P5TcGwKe7qOTPAxi6I7ZS84PRRI7EGnHI0B9it2HMWnF15+rmIxtCv4SdFUQDYp5Px
 QkzE6Q0qFy5jmx6vkLfwCqFG21Aql5FDc0zuJIgtFA/UMEHR77vNZfaz0KaC2+W9476G
 EEFZ0sdmaYCZJ/biJftJCuhG7urUxfwTYvElmv23kkLn7Xjy1oNX4FjBdrXTA86RLoXS
 5h4Uv/ERclBmJr5o7wBEa7n0JTqXm4iHgIqjlrtzNGLhVI6Z2J2zY8Nqg230xlyHPB8L
 vp5wkKzw46eNM1oLOLlsTDph2BCD0wxLcVU91z5RbPSHbOm/yVSNq1OiSXT8vRlV5EPx
 hO2g==
X-Gm-Message-State: AC+VfDxz0ZQ5u3OeGq6/TETv3uM31vsC0ckUMYOptUkdJOKw7ThUReD8
 QqVwYjQBFMz3CwVpC4PFzPo=
X-Google-Smtp-Source: ACHHUZ6uwvNg6wNI6s2HxICBJfi42NkrpxRHZS/jiZl1SKRnCIRl0KD5D9EnIlptdziW/OSJ/rhT8g==
X-Received: by 2002:a05:6512:4da:b0:4e9:afb3:d56a with SMTP id
 w26-20020a05651204da00b004e9afb3d56amr1767223lfq.7.1684574054699; 
 Sat, 20 May 2023 02:14:14 -0700 (PDT)
Received: from smtpclient.apple (c188-150-165-235.bredband.tele2.se.
 [188.150.165.235]) by smtp.gmail.com with ESMTPSA id
 x12-20020a19f60c000000b004f3a17a3daesm202840lfe.74.2023.05.20.02.14.14
 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128);
 Sat, 20 May 2023 02:14:14 -0700 (PDT)
Content-Type: text/plain;
	charset=us-ascii
Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.15\))
Subject: Re: bug#61730: 30.0.50; Compiler warnings for delq and delete
From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= <mattias.engdegard@HIDDEN>
In-Reply-To: <87ednbdatj.fsf@HIDDEN>
Date: Sat, 20 May 2023 11:14:13 +0200
Content-Transfer-Encoding: quoted-printable
Message-Id: <12EE2A5E-A357-4186-9B81-27A65DE9A3DF@HIDDEN>
References: <CCE0F969-49C2-4F80-B61F-CEA7B34544CB@HIDDEN>
 <FC461D70-310D-4905-A859-1BCD336D9410@HIDDEN> <87ednbdatj.fsf@HIDDEN>
To: Michael Heerdegen <michael_heerdegen@HIDDEN>
X-Mailer: Apple Mail (2.3654.120.0.1.15)
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 61730
Cc: 61730 <at> debbugs.gnu.org, Stefan Monnier <monnier@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

20 maj 2023 kl. 03.57 skrev Michael Heerdegen =
<michael_heerdegen@HIDDEN>:

> The delq and delete warnings are enabled now, and we got a question
> about this in emacs-help (by T.V. Raman) that I tried to answer, but =
it
> was about a (slightly doubtful) false positive.
>=20
> Let's see if there is more outcome.

I changed a few spots of murky code that were nevertheless probably (?) =
false positives, so that the result is unequivocally better or at least =
no worse, in 0de472e04f.

Some of the remaining warnings point to what appear to be clear bugs. =
Those should be fixed no matter what.





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#61730; Package emacs. Full text available.

Message received at 61730 <at> debbugs.gnu.org:


Received: (at 61730) by debbugs.gnu.org; 20 May 2023 01:57:25 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri May 19 21:57:25 2023
Received: from localhost ([127.0.0.1]:57679 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1q0BqW-0007QU-PH
	for submit <at> debbugs.gnu.org; Fri, 19 May 2023 21:57:25 -0400
Received: from mout.web.de ([212.227.15.4]:51973)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <michael_heerdegen@HIDDEN>) id 1q0BqV-0007QH-HO
 for 61730 <at> debbugs.gnu.org; Fri, 19 May 2023 21:57:24 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=s29768273;
 t=1684547834; i=michael_heerdegen@HIDDEN;
 bh=6S2HyiCok20YF+oLI2h09W70xNxAVkekWS5P4YkI2cI=;
 h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date;
 b=ClxXEtts+D8nkeUZy/E6z7c0er1QPtJDXPQ8CsJ8dw4oHE4hxZzJb++O8BNVSqtsj
 Iie5Bb9kE46kXZemerh/LQCoztZwpAcN03TxAiuPsN6ZJQI8xJ+XpSQEbklS3Irwtn
 aUsyh4oIUzcBb3HByQ286crQXfm9fKoRoLvixlcZeKryjpZmzFzvS7tw54zWtlfhpr
 5vrUEmrVd7ANnkQoCTfQVlhBatmYYmHnanqp5xtXQkBBXFG7GVMBrRiiToBeazCcMH
 5sGe/5pXFVFVa0Sq2vezoilO+DjwpA5gheQS/uoMjKpfgQHuhfsYpPaxcDoWihyqTX
 ADQfTvrtWCkBA==
X-UI-Sender-Class: 814a7b36-bfc1-4dae-8640-3722d8ec6cd6
Received: from drachen.dragon ([178.14.74.62]) by smtp.web.de (mrweb005
 [213.165.67.108]) with ESMTPSA (Nemesis) id 1M8kEP-1q4snr0Kyv-004jWX; Sat, 20
 May 2023 03:57:14 +0200
From: Michael Heerdegen <michael_heerdegen@HIDDEN>
To: Mattias =?utf-8?Q?Engdeg=C3=A5rd?= <mattias.engdegard@HIDDEN>
Subject: Re: bug#61730: 30.0.50; Compiler warnings for delq and delete
In-Reply-To: <FC461D70-310D-4905-A859-1BCD336D9410@HIDDEN> ("Mattias
 =?utf-8?Q?Engdeg=C3=A5rd=22's?= message of "Mon, 1 May 2023 18:06:45
 +0200")
References: <CCE0F969-49C2-4F80-B61F-CEA7B34544CB@HIDDEN>
 <FC461D70-310D-4905-A859-1BCD336D9410@HIDDEN>
Date: Sat, 20 May 2023 03:57:12 +0200
Message-ID: <87ednbdatj.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Provags-ID: V03:K1:Qy4iYZz2cR2P+gUJvO2GnYvscRU2pGX5LkLQQk9wcOXyKY5z2Sw
 p7IehyvNv1IIs57sqvm3FPvJuM4uo5mB76ze6mOdG8rEfjrr31sDn6+dX3HGQe3k6Lp2aPf
 mDS1q5cZ0zGNfu+Cmu+UZA6+Xxo0a+QRY7xDPKESWmTOUyq6dKuDcUHtJEUmvI88H4aXU+z
 IfH9bCE1iwonkZnjdjrSA==
X-Spam-Flag: NO
UI-OutboundReport: notjunk:1;M01:P0:hzF69GFCej0=;Qq4UyfE++Wy0RhpVLIk+geC5SXk
 jEkSD6/bKTTVGXDsRWxsZxEOH960Zvze6dWuIAb9BJYVcQdZgJRGT2RmQ9qq3sZgeiHap/+Wu
 phywLCYCKVaAgDQq92iOySG/D8PnhYx8gDBHcFZ5vJJvZ1jjKOp6LjW9l6RrQB2Oc2QK5eXXX
 C3IOUn09ZzNFgVZoGErkAfn2lmnHBScC0W0+IS4u+smNYhLB6ceAvGEVCiPzAKpMO2FBrc0z/
 1WgZl2cH7mriEsV6qDgGwIXaHHg9ibQ7+Z3SyRoSKjxz9v4YQElWlP3r+zw0hsGj+YKgtv4eW
 LzxA5grcw/JYS5j6wkMztsDk1LcxA/Xu1mF+EvqDiUEIZWm6lyzogmslTYZDP43YF7OKZPFcV
 oucP0AgaOa9JDaO3d0USVdeqaa+GkH6kvNSOZH+8ZaAQEv3SURuNqGKIByG/lW+eiYBSgmdAi
 r6Ci1jpinQYYQ7dQshSMRfU5hK08fCpNlL4zROeLp9Yfuxht4aEiGuBsEO0XnTOGI6mJzSDEj
 usYoQo2eHdOB3CgSLG8omynsenNKqetsTjyIEIYEN7dM5kGHCGik54v6kZKzPt6ye6KTjdIPs
 hXAqQJ+rh5i8jsE9102OpouiAaSwweXCvl+yMmuINYwRe489iebzoCHRygL8xWbSw7Mlc/l7O
 fcMoBeoD3UZmINpFUcguCJBoh7FHVl01De5IdxzejHm1XxyXmJJKycteWQkIQaxxZuMIYi5P9
 RJrY9J+N29e4OmdprfJd97mfzCu6HoQjwO6Il3kFDFGrJXzEZTWO8VBeYjQIy/sd6FpyPR9EG
 syOy2LmpZFEuowIM8ct4sX9dDrQZL2auaHmTjfsZI5ptLxbBMXIXFpAJXg7ktFLmdov4+RKs0
 iGdCb2sPf7H31+ohfhDSx6jnyYmKm/GVoFI50qb6MevBcZfN1F+Amv6eCSPY0kMIwaHmeYktt
 DYbu8Q==
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 61730
Cc: 61730 <at> debbugs.gnu.org, Stefan Monnier <monnier@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Mattias Engdeg=C3=A5rd <mattias.engdegard@HIDDEN> writes:

> On master there is now a function declaration and property,
> `important-return-value`, that is used to mark functions that the
> compiler should warn about when called without their value being used.
>
> I haven't set the property on delq and delete yet; about half of the
> cases seem to be false positives but it may be worth the effort to
> clean up those too.
> I did fix a correct but somewhat daft use of cl-delete in python.el
> and enabled the warning for that function.

Thanks for that.

The delq and delete warnings are enabled now, and we got a question
about this in emacs-help (by T.V. Raman) that I tried to answer, but it
was about a (slightly doubtful) false positive.

Let's see if there is more outcome.

Michael.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#61730; Package emacs. Full text available.

Message received at 61730 <at> debbugs.gnu.org:


Received: (at 61730) by debbugs.gnu.org; 1 May 2023 16:07:00 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon May 01 12:07:00 2023
Received: from localhost ([127.0.0.1]:40874 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ptW3I-0006Kf-34
	for submit <at> debbugs.gnu.org; Mon, 01 May 2023 12:07:00 -0400
Received: from mail-lf1-f45.google.com ([209.85.167.45]:45502)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <mattias.engdegard@HIDDEN>) id 1ptW3C-0006KO-3m
 for 61730 <at> debbugs.gnu.org; Mon, 01 May 2023 12:06:58 -0400
Received: by mail-lf1-f45.google.com with SMTP id
 2adb3069b0e04-4efef769000so3222606e87.3
 for <61730 <at> debbugs.gnu.org>; Mon, 01 May 2023 09:06:54 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20221208; t=1682957208; x=1685549208;
 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=pJkujemxrSOuu6NaMbmJyX5M6sG8d7j0pBw86U7lECc=;
 b=HSX/l4JwVN/KFOZhz3rEH4JkYzp9HKlcgaL+GyomFg756JeNc3HjOKN3d9PgAeJRQr
 I43rqoZy6tLyXz0DueZ1nougykUCutIdh9alAD7Db6dl4+yIo7SkoPiZpWfsTMljC7ix
 FdXDp5D3It91LARo12ftWFARjeQU2G4ZkRp5swgJmQvhOHt+8O979a6/FRe2N/zVdTqx
 jhlWGxXj83ETQLAkw3VRyvM1jEFkYkx/glpF38CFvoNrwfFENj1RXiUFtLXK1aBJcGHq
 xpmQRDPd21vUOuQAObW9o5XPNzwBlwvsJiBFmx+RmO0Et3CJCagt91nGzNTqSPVrfWE8
 uAYg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20221208; t=1682957208; x=1685549208;
 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=pJkujemxrSOuu6NaMbmJyX5M6sG8d7j0pBw86U7lECc=;
 b=OJmCBxHNwT1qhkQhT5ItaIL+lL7+/glfBx7GODPHcaPCj8WUS5+dwxrdbpP76ihY3n
 2nyjD93SvIlE3WPe62FB2u/jIHi5bNMK/xvQdzs/TiiEawWmG3cL9nNDAEWvvtedDCcS
 878nXzppgtXc6s+Pu5MmiZIcsHL4dS8YBZZH4Z4D8e0xnEshuzRqlZkG1Wl0cVireil6
 tWbBFocJ51AbnoqKg/rcMPdNoEhoeVwWLx+707P1SppyY/698EISCxSFhBPsOSZhI6bK
 VllEmjCsfjr/2CLkcYJXOiTBe19fBvtsBnd9lE3/TeIAm8paEhfVijlrVEzouUl6CXAb
 2FUA==
X-Gm-Message-State: AC+VfDxJanrsn1VVV590x3iaPR92nh346SAX+oEbqUav0JhcB6AEC3hQ
 N1nj+wwM87gAFgreCqN41PoJ15aaYr0=
X-Google-Smtp-Source: ACHHUZ61wA5Vv0L6vOxwy72NLw/23piVFL5vUUYAHJsQHW+evbfAO0JidzQLyNwiA2uEifJhOd+PEg==
X-Received: by 2002:ac2:4116:0:b0:4ef:efb5:bfea with SMTP id
 b22-20020ac24116000000b004efefb5bfeamr3936551lfi.37.1682957207656; 
 Mon, 01 May 2023 09:06:47 -0700 (PDT)
Received: from smtpclient.apple (c188-150-165-235.bredband.tele2.se.
 [188.150.165.235]) by smtp.gmail.com with ESMTPSA id
 z11-20020a19f70b000000b004edc6067affsm4795982lfe.8.2023.05.01.09.06.46
 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128);
 Mon, 01 May 2023 09:06:46 -0700 (PDT)
Content-Type: text/plain;
	charset=us-ascii
Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.15\))
Subject: Re: bug#61730: 30.0.50; Compiler warnings for delq and delete
From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= <mattias.engdegard@HIDDEN>
In-Reply-To: <CCE0F969-49C2-4F80-B61F-CEA7B34544CB@HIDDEN>
Date: Mon, 1 May 2023 18:06:45 +0200
Content-Transfer-Encoding: quoted-printable
Message-Id: <FC461D70-310D-4905-A859-1BCD336D9410@HIDDEN>
References: <CCE0F969-49C2-4F80-B61F-CEA7B34544CB@HIDDEN>
To: 61730 <at> debbugs.gnu.org
X-Mailer: Apple Mail (2.3654.120.0.1.15)
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 61730
Cc: Michael Heerdegen <michael_heerdegen@HIDDEN>,
 Stefan Monnier <monnier@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On master there is now a function declaration and property, =
`important-return-value`, that is used to mark functions that the =
compiler should warn about when called without their value being used.

I haven't set the property on delq and delete yet; about half of the =
cases seem to be false positives but it may be worth the effort to clean =
up those too.
I did fix a correct but somewhat daft use of cl-delete in python.el and =
enabled the warning for that function.





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#61730; Package emacs. Full text available.

Message received at 61730 <at> debbugs.gnu.org:


Received: (at 61730) by debbugs.gnu.org; 9 Apr 2023 16:42:06 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Apr 09 12:42:05 2023
Received: from localhost ([127.0.0.1]:33588 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1plY7B-0008UO-Li
	for submit <at> debbugs.gnu.org; Sun, 09 Apr 2023 12:42:05 -0400
Received: from mail-lf1-f47.google.com ([209.85.167.47]:44753)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <mattias.engdegard@HIDDEN>) id 1plY78-0008Tl-IZ
 for 61730 <at> debbugs.gnu.org; Sun, 09 Apr 2023 12:42:04 -0400
Received: by mail-lf1-f47.google.com with SMTP id z26so3792583lfj.11
 for <61730 <at> debbugs.gnu.org>; Sun, 09 Apr 2023 09:42:02 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20210112; t=1681058516; x=1683650516;
 h=to:cc:date:message-id:subject:mime-version
 :content-transfer-encoding:from:sender:from:to:cc:subject:date
 :message-id:reply-to;
 bh=h+jjpFfdoOTQubkPiQravrWW5oI2oaKjonx8xw4x5nQ=;
 b=TKvOSRly1QPI600PhY75GHhRvdtZ2+NtzO2B+Zchbre8o8qSMbaNjqLqRh6CODMzUd
 OKudsuwmj+i0pT7deXo7C6b5V/lT6EPkbgynd9LDmRe3knuTWsYoJT31UZ+7meTkowTQ
 YAGcT/lBjRKAUFnw2tuV6uoGBzcmyWIAVLJI7AP3L3a78ScDZfcwARwucoayTnlxjXti
 +Zv/OvZYW7lNAoWqN1a4bXy1YQKRpfRx+cjfY9nMu3EsowG9jm6UgXk41F28IF5gSlda
 g0Ovl5J4+IJXi/cI9KSCO1oSlwFVGSX4RqDOulQvAK5JyWLgAGRk+PDcrPrAae8yRj9Q
 1sRA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112; t=1681058516; x=1683650516;
 h=to:cc:date:message-id:subject:mime-version
 :content-transfer-encoding:from:sender:x-gm-message-state:from:to:cc
 :subject:date:message-id:reply-to;
 bh=h+jjpFfdoOTQubkPiQravrWW5oI2oaKjonx8xw4x5nQ=;
 b=ee23lQXnTsMUQBP4atswubMXxh00pAVGeNyoE1J1nq6u1joMv9BRFi/GEDjq8rHZUY
 vXY5yp5yJ4qF1BWVhQKr8ukZ8/E7aB5uQiTHAnv75YNkzq+Jy4eFoI64Yt2AvCADtoj8
 F/WAkUfKfrfUGsL6TekKJ4pggT8r4n05SIHco+ho2pTvSjuoNcy5kNdP6qsW72Pu3Y3E
 48CTA7TvcHLAZ+6gnTNj4FEP0jsyPZFjT4EwCsR0dNNwHQrjKqACxnLoGRylN9BOlcMN
 /HmD9USraf2YRQG7/IreYwebjAZXu1pwP1E/w92+zYzNKLheyFU5ltkhfUrot6c9uGK1
 w98A==
X-Gm-Message-State: AAQBX9f4YGl+xE2EY2a0LOLc42FWliYNXtY5ZfXELWYJq8iunhsPDqmY
 ZG4L9GRv14pOgHKyoAPIdqB1fVogHKg=
X-Google-Smtp-Source: AKy350bwjwV0qrTbpV8gBfad4YPHkNkcYt5KHzXd0POgMBYJphXahpBvyUc25lhnBYHm6wpmecqo5g==
X-Received: by 2002:a19:f602:0:b0:4e9:bdd0:b667 with SMTP id
 x2-20020a19f602000000b004e9bdd0b667mr2029635lfe.0.1681058516418; 
 Sun, 09 Apr 2023 09:41:56 -0700 (PDT)
Received: from smtpclient.apple (c188-150-165-235.bredband.tele2.se.
 [188.150.165.235]) by smtp.gmail.com with ESMTPSA id
 f10-20020a2e918a000000b002a76dd438ddsm742935ljg.79.2023.04.09.09.41.55
 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128);
 Sun, 09 Apr 2023 09:41:55 -0700 (PDT)
From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= <mattias.engdegard@HIDDEN>
Content-Type: text/plain;
	charset=us-ascii
Content-Transfer-Encoding: quoted-printable
Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.15\))
Subject: bug#61730: 30.0.50; Compiler warnings for delq and delete
Message-Id: <CCE0F969-49C2-4F80-B61F-CEA7B34544CB@HIDDEN>
Date: Sun, 9 Apr 2023 18:41:54 +0200
To: 61730 <at> debbugs.gnu.org
X-Mailer: Apple Mail (2.3654.120.0.1.15)
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 61730
Cc: Michael Heerdegen <michael_heerdegen@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

There is now a consolidated and improved ignored-return-value warning on =
master. However, it does not yet warn about delq and delete, which this =
bug originally was about, but keeps a list of other functions for which =
such a warning makes sense. The false-positive rate seems to be low =
enough.

The warning can be suppressed using `ignore`, or =
`with-suppressed-warnings`.

Once the issues indicated by the warnings remaining on master have been =
dealt with, other functions will be considered for addition, depending =
on how useful this would be.





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#61730; Package emacs. Full text available.

Message received at 61730 <at> debbugs.gnu.org:


Received: (at 61730) by debbugs.gnu.org; 27 Feb 2023 11:44:30 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Feb 27 06:44:30 2023
Received: from localhost ([127.0.0.1]:46260 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pWbvh-0003gF-ON
	for submit <at> debbugs.gnu.org; Mon, 27 Feb 2023 06:44:30 -0500
Received: from eggs.gnu.org ([209.51.188.92]:51248)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1pWbvg-0003g4-Kv
 for 61730 <at> debbugs.gnu.org; Mon, 27 Feb 2023 06:44:29 -0500
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 <eliz@HIDDEN>) id 1pWbvb-00070M-EI
 for 61730 <at> debbugs.gnu.org; Mon, 27 Feb 2023 06:44:23 -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=qbHBv7n63gaYlVPXlFlqbacchGDW2MHwykT4l5ZDoo8=; b=rkHQ2FOcOPq8
 wDILD5m+iyko+IyMYfEI/futVxTnNTEDbxLDgd3JvlmWsXgddeMEHQLjm6jZgFvSWXqV256GM9raw
 L3TsWf9Iir5/U9eiLysay9SbjGzF7ByXa4EwBznwXJBDfwZ89WdOIOi1YRbyXkXOJU5CgmFu4vl3b
 b1iRTqUdxLQza25GPf0rZ6C+ooOafYO+fZqqABy5y48NCaGaz/GZLwtkI5NcCqTPgsT1klY6qcU6z
 h8h+PjR03DfEffUz/EJnKt7QmPD7ABG3S6MMamZpOYD/F2yOslCKwP+jwrHWXthcNj8D1teWKxAxe
 cbiXmihz3K1YPZIkJojibw==;
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 <eliz@HIDDEN>)
 id 1pWbvT-0005r7-RU; Mon, 27 Feb 2023 06:44:17 -0500
Date: Mon, 27 Feb 2023 13:44:23 +0200
Message-Id: <835ybnib8o.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: rms@HIDDEN
In-Reply-To: <E1pWU7n-0002ao-6j@HIDDEN> (message from Richard
 Stallman on Sun, 26 Feb 2023 22:24:27 -0500)
Subject: Re: bug#61730: 30.0.50; Compiler warnings for delq and delete
References: <87ilfsisje.fsf@HIDDEN>
 <670D8E4A-333D-4E2D-97CC-86728965989D@HIDDEN>
 <83a613np4p.fsf@HIDDEN> <87fsavf688.fsf@HIDDEN>
 <E1pVlyW-0004QZ-Av@HIDDEN> <83k006kvv6.fsf@HIDDEN>
 <E1pWU7n-0002ao-6j@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 61730
Cc: 61730 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Richard Stallman <rms@HIDDEN>
> Cc: 61730 <at> debbugs.gnu.org
> Date: Sun, 26 Feb 2023 22:24:27 -0500
> 
>   > In Emacs maintenance and development, the two cases are actually one.
>   > We rebuild Emacs so frequently that even a "rare" warning appears all
>   > the time and is annoying.  It is not a coincidence that we usually
>   > don't tolerate warnings during the build of Emacs.
> 
> I am surprised -- I didn't do that when I was the main maintainer.

We have more branches than back then.  I routinely build 3 branches
every day -- master, the release branch, and a feature branch for some
long-living feature.  I build 3 more branches weekly.  So I see the
same or similar warnings more than once each day.  The situations
where many Lisp files need to be recompiled are also more frequent
nowadays, due to a much more massive use of macros.  These reasons add
up.

> In recent years, ISTR seeing warnings in the build often enough.

You are tracking the master branch, which is by definition less clean
wrt warnings.

> I resent it when a compiler takes up my time pressuring me to prove to
> it that I know something isn't a bug, and I usually tell that compiler
> (inside my head) where it can take those warnings.

Likewise.  Although the place I use (in my head) is called by a
somewhat different name.  But is similar in nature.

> When I implemented the options that enable such warnings in GCC, I
> urged people NOT to use those options by default.  To enable them by
> default in a makefile is to impose systematic harassment on every
> contributor to the code.  You end up with a program as your
> taskmaster, haranguing you continually to insert proof that you didn't
> make some mistake.

Sadly, that stance is all but gone nowadays: compilers, including GCC,
wine too much, especially if you use "-Wall", and many projects use
"-Wall" by default.  That is called "progress".

End of rant.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#61730; Package emacs. Full text available.

Message received at 61730 <at> debbugs.gnu.org:


Received: (at 61730) by debbugs.gnu.org; 27 Feb 2023 11:37:38 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Feb 27 06:37:38 2023
Received: from localhost ([127.0.0.1]:46254 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pWbp3-0003W0-TC
	for submit <at> debbugs.gnu.org; Mon, 27 Feb 2023 06:37:38 -0500
Received: from eggs.gnu.org ([209.51.188.92]:46184)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1pWboz-0003Vk-ES
 for 61730 <at> debbugs.gnu.org; Mon, 27 Feb 2023 06:37:36 -0500
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 <eliz@HIDDEN>)
 id 1pWbor-0005mx-UL; Mon, 27 Feb 2023 06:37:26 -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=KJz2iOh3R0iwUvR1LlRmCl5jzeZO3bpT00axFlOT3ew=; b=Bh4nbywCrtsQ
 pMggByGdQLrQ1hHo3ABn8nzR8ip+3tpSSQL9tu+gwvfeKEgz1wCND+8dFoeUJ4JclZ51It0EKx8pP
 35B1d7SBXrxGdNld7cdOiExJeO5TOS9ZVFYiAUfVyiQGQsnZRWG44+h+RvoHnwz+vXwiCasqILQW1
 XZtjbQw6856FngPXFFHh+kAgy8t/AzsHipKCppCR0NGvIrLYAPWqDfAlHYf+7qfhV/j0rubgth3aa
 VrtHCJeEELbRltV6TiIBGU10cSbMgrP7sprZpinsExw9IVY2UqlA57Us1qkxH5gYEkiUZM5HUaNge
 21MMaJBMv6xcPs6OTzvf4A==;
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 <eliz@HIDDEN>)
 id 1pWbol-0004zw-GR; Mon, 27 Feb 2023 06:37:20 -0500
Date: Mon, 27 Feb 2023 13:37:27 +0200
Message-Id: <837cw3ibk8.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: rms@HIDDEN
In-Reply-To: <E1pWU6M-000258-1n@HIDDEN> (message from Richard
 Stallman on Sun, 26 Feb 2023 22:22:58 -0500)
Subject: Re: bug#61730: 30.0.50; Compiler warnings for delq and delete
References: <87ilfsisje.fsf@HIDDEN>
 <670D8E4A-333D-4E2D-97CC-86728965989D@HIDDEN>
 <83a613np4p.fsf@HIDDEN> <87fsavf688.fsf@HIDDEN>
 <E1pVlyW-0004QZ-Av@HIDDEN> <83k006kvv6.fsf@HIDDEN>
 <87k005gbys.fsf@HIDDEN> <835ybplvvf.fsf@HIDDEN> <87mt51n5mz.fsf@HIDDEN>
 <83y1olkaov.fsf@HIDDEN> <E1pWU6M-000258-1n@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 61730
Cc: michael_heerdegen@HIDDEN, mattias.engdegard@HIDDEN,
 61730 <at> debbugs.gnu.org, monnier@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Richard Stallman <rms@HIDDEN>
> Cc: michael_heerdegen@HIDDEN, mattias.engdegard@HIDDEN,
> 	61730 <at> debbugs.gnu.org, monnier@HIDDEN
> Date: Sun, 26 Feb 2023 22:22:58 -0500
> 
> Or, how about having an option to enable these warnings, with "off"
> as the default?

That would be nice, yes.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#61730; Package emacs. Full text available.

Message received at 61730 <at> debbugs.gnu.org:


Received: (at 61730) by debbugs.gnu.org; 27 Feb 2023 10:37:17 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Feb 27 05:37:17 2023
Received: from localhost ([127.0.0.1]:46181 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pWase-0001j7-Rm
	for submit <at> debbugs.gnu.org; Mon, 27 Feb 2023 05:37:17 -0500
Received: from mout.web.de ([217.72.192.78]:32819)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <michael_heerdegen@HIDDEN>) id 1pWasb-0001is-RC
 for 61730 <at> debbugs.gnu.org; Mon, 27 Feb 2023 05:37:15 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=s29768273;
 t=1677494222; i=michael_heerdegen@HIDDEN;
 bh=JaDXJsrH8b6eL1oBTgaB2rtbqunfx5mwW6PLdt74IPI=;
 h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date;
 b=aaV0VPrCywBDTwG+Fkf2jT9kOZdTw5Q+tIvspEC7ml9kedKDKxlxQDC8Xb4Z2PMEU
 D48ySFFwTlJIbbBg4SW+97ELSn+nuMNpcRocNHTYt1c8oPhVmzE7KcyFuBnHEPh/rS
 3VUeM0ztZdHGb48pXZBVstkeXfbMOBAeRFU5thL75IWO4mdDLfdYoeS1CQcvo26BdP
 Txtb72jgWgxmoq56LoA0GMMKaq66fgMKS9bbnu+bqvKUpL42sowwZIDJsxlMxtQWVO
 uHYSROhm7269vehOxI9AYBj/tUrtF+d9sThKge5t3x+yWsKdIEQNkbp2tvTadvNZJI
 WtNstNhR54fEQ==
X-UI-Sender-Class: 814a7b36-bfc1-4dae-8640-3722d8ec6cd6
Received: from drachen.dragon ([84.59.210.57]) by smtp.web.de (mrweb105
 [213.165.67.124]) with ESMTPSA (Nemesis) id 1MbTL1-1ovLBH31ZZ-00bkzo; Mon, 27
 Feb 2023 11:37:02 +0100
From: Michael Heerdegen <michael_heerdegen@HIDDEN>
To: Richard Stallman <rms@HIDDEN>
Subject: Re: bug#61730: 30.0.50; Compiler warnings for delq and delete
In-Reply-To: <E1pWU6M-000258-1n@HIDDEN> (Richard Stallman's message
 of "Sun, 26 Feb 2023 22:22:58 -0500")
References: <87ilfsisje.fsf@HIDDEN>
 <670D8E4A-333D-4E2D-97CC-86728965989D@HIDDEN>
 <83a613np4p.fsf@HIDDEN> <87fsavf688.fsf@HIDDEN>
 <E1pVlyW-0004QZ-Av@HIDDEN> <83k006kvv6.fsf@HIDDEN>
 <87k005gbys.fsf@HIDDEN> <835ybplvvf.fsf@HIDDEN>
 <87mt51n5mz.fsf@HIDDEN> <83y1olkaov.fsf@HIDDEN>
 <E1pWU6M-000258-1n@HIDDEN>
Date: Mon, 27 Feb 2023 11:37:01 +0100
Message-ID: <87v8jnpf76.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-Provags-ID: V03:K1:ECgfahXVP+RQ53vSj9R3mw9pjAdWyQu2YRi9xNvZw/ry1PefNoB
 5dg/DBi8MOd3C/c6gVXo5nyigmCzHt6ELnYvEFjUSv2SWuZtbZpJNUtoKRPvF0KM/CPtEnd
 xNn+irpn2GONY6F/DJjp1w8w1YTYfeASyWl1aZMbY1iOuogWu9Nir3ZJIfZx5mHCHG/D5ht
 TBvWXGLXZhrqoSC0iUJcA==
X-Spam-Flag: NO
UI-OutboundReport: notjunk:1;M01:P0:wcvHgCAkwLE=;Lt0Ckf1OtfAwnXwzoUY2Eg09tA9
 YLWc43obJBdnj77yF3EIlxarmj1Fp+ukURHp+ECWxT49J/4Tibk37UsSeONYyHe3uL0R0dcMD
 tQvzCKVAwJ5xa7BQQX3GFhq+8k7zka+gQY5/EurJ1XMQuJu47afr0EKjKZOHfVpL8i87g24pD
 jEUmPTuB2lE1ddiOACbXGYulRBkplIrcbz2277CerxlEPe94WGFt1fnZhEpC/uRlbys2x3dNh
 aqJQOt4FagJxtFIiAhvIBnB9UQdc3aIWGMlWKt9ArsrjadMbwEtN1WH+tcr+igZCPXEDdSfwn
 CTi2avg/3ayXogL4xuMqHqyCR3xPHRKZYtmEwZao3S5IsEx+66lnuWojaF77nj74cezvM7Cc4
 p+/XVQ1svYrD1DXUGKZS0O3faVPxB/k9RaJID127UQnv5TK5IFyeLbcshi/UAXW7+6GE+/VJB
 yIcT/v5KL4BaipiMB4TV3OhzWEvHMCV61BTrK31Z2Ykrr615Harzt2wZbq7vhqkNwp5+5Daf2
 yLCcJxDhzCDlvfRzlyRKGDwv/xMSNx6Lz0KqloSgF0JokbIVVJ4FKvhQCMRD7ER2wLWzxzENt
 FTGgRIYqVJaV/sEZFfy9u7kQSyS7GjZ0Y/L/ILnQZRXiIrKSm4YEXYzEYrRjIc1fy174S4H8K
 r+Bb0K7JWmRf8poRDllknnfiLUr24FLko17SJGbgzuXcBI1B120tGQ9eczV1GThW0h52v7T1V
 VOO4HKYtj31I4RU3GjRm7N4wWfFBNYvD+bjYLCdESAVJBnTwdpUyVWpy3rYmW6Y1f7NC6nX71
 wo82lVNWENbyA4z6JOS9CuL2SkPaa0moH2UK3bqeHN5QNL4zZyqTD9aZI4dOrOibHTTGB81iA
 IgNSiQx+UO2tskgTZCoYasOp0GBUtz0ZH00ns7ltkv+AHcx8ucFqE3Ni46OmUQc9M/wqbBOda
 7qdkdDnHqa3YRj9+TnL4Q/A5zaQ=
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 61730
Cc: Eli Zaretskii <eliz@HIDDEN>, 61730 <at> debbugs.gnu.org,
 mattias.engdegard@HIDDEN, monnier@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Richard Stallman <rms@HIDDEN> writes:

>   > > I mean all functions with either no side effects or such which
>   > > may alter
>   > > original list structures but in unpredictable ways so that only the
>   > > return value is ever useful.

> These sorts of warnings can be annoying.

How can warning about clear mistakes be annoying?

Michael.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#61730; Package emacs. Full text available.

Message received at 61730 <at> debbugs.gnu.org:


Received: (at 61730) by debbugs.gnu.org; 27 Feb 2023 03:24:38 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Feb 26 22:24:38 2023
Received: from localhost ([127.0.0.1]:45554 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pWU7x-00021Y-T2
	for submit <at> debbugs.gnu.org; Sun, 26 Feb 2023 22:24:38 -0500
Received: from eggs.gnu.org ([209.51.188.92]:50014)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rms@HIDDEN>) id 1pWU7v-00021J-Ia
 for 61730 <at> debbugs.gnu.org; Sun, 26 Feb 2023 22:24:36 -0500
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 <rms@HIDDEN>) id 1pWU7q-0000IK-By
 for 61730 <at> debbugs.gnu.org; Sun, 26 Feb 2023 22:24:30 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=Date:References:Subject:In-Reply-To:To:From:
 mime-version; bh=aCsSHDHk7lxG4MSahk2n+9seLhVRONTE3KdL+aOvMvU=; b=WpFnkEL03m83
 G0YL30kvLpQ+8NfDB5AggkvY0E0zzN8pekmnf8QU+1RYj+IfdFhLnwujkBa9TrKewthpaZHGFeEox
 vMDmsIyf90hi37lIlgf35JHKVdzTgTU+rubGAjFpIj94dHrxe+jUij+n4jV/rysC4106Sxi3qrG4f
 eN+w9nEcnt8EkAB4UCVPP6CcQ5CWrsWQzordfl65ZhVbxsps+LHQ1hwGU6p0O/lubOwneeYKJuiEA
 ZZyi9fOr6Y7nv1jh8GAkpPUjDrbjMMur2fq2m1CcSbBiCz2Ct13lLUD43vnTSnm5GnH5beQKhdIoa
 AWL+K8t1cNKkEc3JlAxZpQ==;
Received: from rms by fencepost.gnu.org with local (Exim 4.90_1)
 (envelope-from <rms@HIDDEN>)
 id 1pWU7n-0002ao-6j; Sun, 26 Feb 2023 22:24:29 -0500
Content-Type: text/plain; charset=Utf-8
From: Richard Stallman <rms@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
In-Reply-To: <83k006kvv6.fsf@HIDDEN> (message from Eli Zaretskii on Sat, 25
 Feb 2023 10:11:25 +0200)
Subject: Re: bug#61730: 30.0.50; Compiler warnings for delq and delete
References: <87ilfsisje.fsf@HIDDEN>
 <670D8E4A-333D-4E2D-97CC-86728965989D@HIDDEN>
 <83a613np4p.fsf@HIDDEN> <87fsavf688.fsf@HIDDEN>
 <E1pVlyW-0004QZ-Av@HIDDEN> <83k006kvv6.fsf@HIDDEN>
Message-Id: <E1pWU7n-0002ao-6j@HIDDEN>
Date: Sun, 26 Feb 2023 22:24:27 -0500
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 61730
Cc: 61730 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Reply-To: rms@HIDDEN
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

  > In Emacs maintenance and development, the two cases are actually one.
  > We rebuild Emacs so frequently that even a "rare" warning appears all
  > the time and is annoying.  It is not a coincidence that we usually
  > don't tolerate warnings during the build of Emacs.

I am surprised -- I didn't do that when I was the main maintainer.  In
recent years, ISTR seeing warnings in the build often enough.

If you intend to make a change to prevent each such warning, that
implies that each spurious warning is a bigger pain in the neck.  That
makes a stronger argument for making fewer warnings rather than more.

I resent it when a compiler takes up my time pressuring me to prove to
it that I know something isn't a bug, and I usually tell that compiler
(inside my head) where it can take those warnings.

  > What's your opinion about the case of non-destructive functions - is it
  > ok if we would always warn about thrown away return values of calls of
  > them?

Either make it an optional feature (and disabled by default), or do
not implement them.

When I implemented the options that enable such warnings in GCC, I
urged people NOT to use those options by default.  To enable them by
default in a makefile is to impose systematic harassment on every
contributor to the code.  You end up with a program as your
taskmaster, haranguing you continually to insert proof that you didn't
make some mistake.

I never used those options.

-- 
Dr Richard Stallman (https://stallman.org)
Chief GNUisance of the GNU Project (https://gnu.org)
Founder, Free Software Foundation (https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)






Information forwarded to bug-gnu-emacs@HIDDEN:
bug#61730; Package emacs. Full text available.

Message received at 61730 <at> debbugs.gnu.org:


Received: (at 61730) by debbugs.gnu.org; 27 Feb 2023 03:23:08 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Feb 26 22:23:07 2023
Received: from localhost ([127.0.0.1]:45542 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pWU6V-0001yp-HC
	for submit <at> debbugs.gnu.org; Sun, 26 Feb 2023 22:23:07 -0500
Received: from eggs.gnu.org ([209.51.188.92]:45712)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rms@HIDDEN>) id 1pWU6S-0001xq-Vj
 for 61730 <at> debbugs.gnu.org; Sun, 26 Feb 2023 22:23:06 -0500
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 <rms@HIDDEN>)
 id 1pWU6M-0008Ih-BJ; Sun, 26 Feb 2023 22:22:58 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=Date:References:Subject:In-Reply-To:To:From:
 mime-version; bh=jMCiMTaPV75CEwTCqvMEIEEPu0whhsUt2xXoaj48fXs=; b=j9bqYJtG7egg
 sRjbt9fqOwRUaixf2aFPxJfOzs252Imis7rLvpAYzSi77ZyVkIFCEr6NTjrMov5gS3YbZqQ6Qm7yn
 WQ1r9cYt7VA8azUBf+eR4LesXEA3iy1zh+snlOLRrCwwDGZsY3dmSZ/XF+rbenbjzBtBsW9VYMPxv
 cgBGVT1NmfdWMfefsKjXgioMn5ntKyBT3zt+MY/q5b4cKdgfHr1JN85tjJjrRFnBuEnXtRN3frEy2
 eBjvifvL7kwpgUtJ+0xhAfr0IQW/3Mk7WnYDd8oOyOQlQRigoMSBEYiQIhB6y9uyaLm6UW/q7Dxf1
 tPCNZjpY6bZPSOfuP/fHyA==;
Received: from rms by fencepost.gnu.org with local (Exim 4.90_1)
 (envelope-from <rms@HIDDEN>)
 id 1pWU6M-000258-1n; Sun, 26 Feb 2023 22:22:58 -0500
Content-Type: text/plain; charset=Utf-8
From: Richard Stallman <rms@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
In-Reply-To: <83y1olkaov.fsf@HIDDEN> (message from Eli Zaretskii on Sat, 25
 Feb 2023 17:48:48 +0200)
Subject: Re: bug#61730: 30.0.50; Compiler warnings for delq and delete
References: <87ilfsisje.fsf@HIDDEN>
 <670D8E4A-333D-4E2D-97CC-86728965989D@HIDDEN>
 <83a613np4p.fsf@HIDDEN> <87fsavf688.fsf@HIDDEN>
 <E1pVlyW-0004QZ-Av@HIDDEN> <83k006kvv6.fsf@HIDDEN>
 <87k005gbys.fsf@HIDDEN> <835ybplvvf.fsf@HIDDEN> <87mt51n5mz.fsf@HIDDEN>
 <83y1olkaov.fsf@HIDDEN>
Message-Id: <E1pWU6M-000258-1n@HIDDEN>
Date: Sun, 26 Feb 2023 22:22:58 -0500
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 61730
Cc: michael_heerdegen@HIDDEN, mattias.engdegard@HIDDEN,
 61730 <at> debbugs.gnu.org, monnier@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Reply-To: rms@HIDDEN
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

  > > I mean all functions with either no side effects or such which may alter
  > > original list structures but in unpredictable ways so that only the
  > > return value is ever useful.

  > Thanks.  I guess this should be okay, but a test run over our sources
  > would be prudent before the final decision.

These sorts of warnings can be annoying.  Whoever actually writes
this, please show us the full list of warnings that you propose to
implement, before putting them into master.

Or, how about having an option to enable these warnings, with "off"
as the default?

-- 
Dr Richard Stallman (https://stallman.org)
Chief GNUisance of the GNU Project (https://gnu.org)
Founder, Free Software Foundation (https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)






Information forwarded to bug-gnu-emacs@HIDDEN:
bug#61730; Package emacs. Full text available.

Message received at 61730 <at> debbugs.gnu.org:


Received: (at 61730) by debbugs.gnu.org; 25 Feb 2023 15:49:08 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Feb 25 10:49:08 2023
Received: from localhost ([127.0.0.1]:41320 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pVwnM-0002w2-2r
	for submit <at> debbugs.gnu.org; Sat, 25 Feb 2023 10:49:08 -0500
Received: from eggs.gnu.org ([209.51.188.92]:53722)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1pVwnK-0002vX-MK
 for 61730 <at> debbugs.gnu.org; Sat, 25 Feb 2023 10:49:07 -0500
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 <eliz@HIDDEN>)
 id 1pVwnE-00012Z-6G; Sat, 25 Feb 2023 10:49:01 -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=FyGBlV8IKKCD3Q9f4OgjYoKq2ynx5cvXoGc4amR06fI=; b=ntconfytPvoV
 dOhqRSeiD5TGUPqwS8mfdF9lqsvSNSD1qBxzDie1ylug0rbdNnk6Q7ZT0UveAlTWtD9+kKjCEvVbg
 dyEaR4HiB5qAM5DwIngfmqGDkDGQ1cWLvewPZ/8y7SJBpWmnLSuPuD3z52LBi9ln8/8Bpv961kxgE
 Q+2S0CDYaZFiz7LDaoLtn/P8X5KZds6dX5ssEwjVn6Eavwy280Xmi0mkcedcEFjXo9aYiuB+S78oJ
 sdWvcldTfdi+OsjP4hPJ2AdgtdSwU+rETNwDFIa5BYAyHbY6lIVVWNzRavl0e5KRtR9YD10mmB4cw
 feRy6AyZnbgmTqwYB3DkKQ==;
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 <eliz@HIDDEN>)
 id 1pVwn0-0001SI-AD; Sat, 25 Feb 2023 10:48:53 -0500
Date: Sat, 25 Feb 2023 17:48:48 +0200
Message-Id: <83y1olkaov.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Michael Heerdegen <michael_heerdegen@HIDDEN>
In-Reply-To: <87mt51n5mz.fsf@HIDDEN> (message from Michael Heerdegen on Sat,
 25 Feb 2023 16:09:40 +0100)
Subject: Re: bug#61730: 30.0.50; Compiler warnings for delq and delete
References: <87ilfsisje.fsf@HIDDEN>
 <670D8E4A-333D-4E2D-97CC-86728965989D@HIDDEN>
 <83a613np4p.fsf@HIDDEN> <87fsavf688.fsf@HIDDEN>
 <E1pVlyW-0004QZ-Av@HIDDEN> <83k006kvv6.fsf@HIDDEN>
 <87k005gbys.fsf@HIDDEN> <835ybplvvf.fsf@HIDDEN> <87mt51n5mz.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 61730
Cc: mattias.engdegard@HIDDEN, 61730 <at> debbugs.gnu.org, rms@HIDDEN,
 monnier@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Michael Heerdegen <michael_heerdegen@HIDDEN>
> Cc: rms@HIDDEN,  mattias.engdegard@HIDDEN,  61730 <at> debbugs.gnu.org,
>   monnier@HIDDEN
> Date: Sat, 25 Feb 2023 16:09:40 +0100
> 
> Eli Zaretskii <eliz@HIDDEN> writes:
> 
> > > What's your opinion about the case of non-destructive functions - is it
> > > ok if we would always warn about thrown away return values of calls of
> > > them?
> >
> > What are "non-destructive functions" in this context?
> 
> I mean all functions with either no side effects or such which may alter
> original list structures but in unpredictable ways so that only the
> return value is ever useful.

Thanks.  I guess this should be okay, but a test run over our sources
would be prudent before the final decision.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#61730; Package emacs. Full text available.

Message received at 61730 <at> debbugs.gnu.org:


Received: (at 61730) by debbugs.gnu.org; 25 Feb 2023 15:30:06 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Feb 25 10:30:06 2023
Received: from localhost ([127.0.0.1]:41309 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pVwUw-0002QU-6m
	for submit <at> debbugs.gnu.org; Sat, 25 Feb 2023 10:30:06 -0500
Received: from mout.web.de ([212.227.17.11]:42279)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <michael_heerdegen@HIDDEN>) id 1pVwUv-0002PX-5H
 for 61730 <at> debbugs.gnu.org; Sat, 25 Feb 2023 10:30:05 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=s29768273;
 t=1677338996; i=michael_heerdegen@HIDDEN;
 bh=fhLsE8OBvKKm2+uFCvTqJA7Mt3+Q/hOI7ZnH27nzZJw=;
 h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date;
 b=HqirQxB+wLJnPhPGnfQxjHmDImSWL9Uf8ztBek/qg5amwGEnDgXilv++uXw5WFdt5
 PXXQgmaKMEIitt8EU1IOoY91/Sjt5HdD+F9q/tVvjZfPFfivp5bIAuKAs/juheFnrw
 xvouWjpzZZgLRgCV1Z/WdWhxxz6eg+vMt8HRWI6V1bdSMla7ILVeOsyxTGTzKEEN2l
 O8vxkbwI36gdXIDHP/tfI0+SR2XjxxeohV3GyBDJ47ybK/XqovDvY0s5WKEMB8+cPv
 zDR0iWB7w92rlXJ+Q7eaSTuRJpGYdI3k4AM4h8VeWbQT/EDPexnF2RGbZcrP1uOlyM
 T6SQOg/MkKpHw==
X-UI-Sender-Class: 814a7b36-bfc1-4dae-8640-3722d8ec6cd6
Received: from drachen.dragon ([84.59.210.57]) by smtp.web.de (mrweb105
 [213.165.67.124]) with ESMTPSA (Nemesis) id 1MTfol-1p4kQb0nAz-00U9Kx; Sat, 25
 Feb 2023 16:29:56 +0100
From: Michael Heerdegen <michael_heerdegen@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#61730: 30.0.50; Compiler warnings for delq and delete
In-Reply-To: <87mt51n5mz.fsf@HIDDEN> (Michael Heerdegen's message of "Sat, 25
 Feb 2023 16:09:40 +0100")
References: <87ilfsisje.fsf@HIDDEN>
 <670D8E4A-333D-4E2D-97CC-86728965989D@HIDDEN>
 <83a613np4p.fsf@HIDDEN> <87fsavf688.fsf@HIDDEN>
 <E1pVlyW-0004QZ-Av@HIDDEN> <83k006kvv6.fsf@HIDDEN>
 <87k005gbys.fsf@HIDDEN> <835ybplvvf.fsf@HIDDEN>
 <87mt51n5mz.fsf@HIDDEN>
Date: Sat, 25 Feb 2023 16:29:53 +0100
Message-ID: <87ilfpn4pa.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-Provags-ID: V03:K1:Ymiv+KHj/UnfFUvUBkYAhkjHsqRB8kBHuuoaMCmtrxaDdiPQi27
 SYDBzM7/gIpmJ9eCsmbLMA+tuX3NFf1M6mB3/cVoCqslNMOy+NkzPl+/BKnWNMq9+WtJliF
 gJziR88JsWoUQczeDjkzcNvOm8VG1qgZx3ooLboRptUKCALsDdua+eVQUkZawV1lmXP5PgJ
 ReZbXjhhZd2nH6dsN58eA==
X-Spam-Flag: NO
UI-OutboundReport: notjunk:1;M01:P0:aGQaHFxTIps=;XGbNVTU9z77/2ibyGZhMxhf4pj9
 kJ+UIMdHXOx7X62h5fbt6mCGZoiOsyA8KWn2zh5yTfBHSJkuNkEbSGFbr3heIPfDD5JDmN9of
 ntHQyob3uEC2iesmdPqEgS5He+oUGCWrVjkDE+Iw1Gos28lCCTI/HPsuPR2tbqvDN1VRoyBEx
 iPT715JBgPM4O8NLTsLJ27rNybIBqrLRTtaDfpfK/YgrFvbvhYaCzIulYMp+9dZSCBBEFlvb+
 yo+3A9mQMKtHwcuzConmt+iaaC2H7ShuNZUKvYtprHZXviNrxNNDC5JkoKABeXbRyTPgcbLEg
 xIYt8x4T3rvvOLhFwkHthEU19FMY08oN5O//ttF1h1dzLFMHzFL3lTA9HylyO/+IQn1JIaxg4
 PyYjc/Ki58cE0BiSqQA73qouCb6baWfNBMY2cNQ1Sjz6VKqQ1irTW1gsO8bn0vDOKsNFaaldR
 Pg0AxtVNhuHC0H4bQkfaJpzhveQtT2iNhdm09xTWExV62GJUR6E7QwYjUfZHngmnptJzrgpWx
 OAzdD4PZjynWhSRHKZsKsg0UMUhXEn95vYunSrQDhGG7JEI+hyjM8ulVRPNpMJUOlKMlByv4b
 zChP1n7SS0LmylL8V5eIPCLJSWvHga1QcoMGeNs5hwPSf501rCls8HA3ydhgIaJFLfwXA4R7E
 ovOCWwEqUjGj6wpPPLmmg4i6BDBn5geKaU/6aq7OsyVe5FlZz9dn53Zg85+u9RukzKaielHfX
 29gDQSIZO9M9iQDlWHS8dKlKQ5QlOy8cVXEF1mTKkxWwz51J3L3ZpMpo3XlHwWLy13V7996DJ
 ERG51SuvxsOYvkD+K/VtpgdBk0Wsmikugx85j0yjK1F135PhKI7xrZWYub3HyZ9fC953fC4x6
 sSU48eoCiVD5n05eB5heDLAybTJ6r2/A8Rju2v4wSFdiIxJ6G0zLyIrnoSQTSGM6R6baN6I7j
 +x2wTVU+tGn5wdrTbzRsnozPWhg=
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 61730
Cc: mattias.engdegard@HIDDEN, 61730 <at> debbugs.gnu.org, rms@HIDDEN,
 monnier@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Michael Heerdegen <michael_heerdegen@HIDDEN> writes:

> I mean all functions with either no side effects or such which may alter
> original list structures but in unpredictable ways so that only the
> return value is ever useful.

With other words: calls where we are sure that they can't make sense.

Michael.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#61730; Package emacs. Full text available.

Message received at 61730 <at> debbugs.gnu.org:


Received: (at 61730) by debbugs.gnu.org; 25 Feb 2023 15:09:53 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Feb 25 10:09:53 2023
Received: from localhost ([127.0.0.1]:41286 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pVwBN-0001vV-9X
	for submit <at> debbugs.gnu.org; Sat, 25 Feb 2023 10:09:53 -0500
Received: from mout.web.de ([212.227.17.11]:40115)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <michael_heerdegen@HIDDEN>) id 1pVwBL-0001vE-GN
 for 61730 <at> debbugs.gnu.org; Sat, 25 Feb 2023 10:09:52 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=s29768273;
 t=1677337781; i=michael_heerdegen@HIDDEN;
 bh=KBgpo8DOai33lWCdYAbY+6VZYtkPIGcei5/2NUpC0Is=;
 h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date;
 b=omMOBHv5Ea1tlvmhqIYDhFNbf513nIaWjXoVCN/zbmP83V0itQcnYUfdE86iNmYvw
 MqpN2WMVcuZPikDNh1ZQviLgswIvHqxC/N5yQFs/EYEopIcCucdx/hqjK678FOtdm9
 hcnMav7kS6/FWKwnS8dCHSbyT4ao9babXgkR+iyqDTz6nr72YNr5Hsdg7nqTtw7QKf
 ti/qr0qmZj3S9RHCA/nVRuWwbcvaNCwshKmTTS+b5x8JykoKezolE92ABJKFptXsGo
 FSaYgD2jC3nLHTwfm5Gp3cxo/H4X9m2MKAP6x8rLY4ZfPy2T9uualyQzGaQZXorHub
 YLXlkH+7mj5rQ==
X-UI-Sender-Class: 814a7b36-bfc1-4dae-8640-3722d8ec6cd6
Received: from drachen.dragon ([84.59.210.57]) by smtp.web.de (mrweb105
 [213.165.67.124]) with ESMTPSA (Nemesis) id 1MmQcl-1ooJoy2RDV-00iNvX; Sat, 25
 Feb 2023 16:09:41 +0100
From: Michael Heerdegen <michael_heerdegen@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#61730: 30.0.50; Compiler warnings for delq and delete
In-Reply-To: <835ybplvvf.fsf@HIDDEN> (Eli Zaretskii's message of "Sat, 25 Feb
 2023 15:25:56 +0200")
References: <87ilfsisje.fsf@HIDDEN>
 <670D8E4A-333D-4E2D-97CC-86728965989D@HIDDEN>
 <83a613np4p.fsf@HIDDEN> <87fsavf688.fsf@HIDDEN>
 <E1pVlyW-0004QZ-Av@HIDDEN> <83k006kvv6.fsf@HIDDEN>
 <87k005gbys.fsf@HIDDEN> <835ybplvvf.fsf@HIDDEN>
Date: Sat, 25 Feb 2023 16:09:40 +0100
Message-ID: <87mt51n5mz.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-Provags-ID: V03:K1:DWiYHHkgSqX1TJvEJOGGPa1zETvKxAgtB7Ely7uVZ2vKETdJE1y
 BjAjWEtVZRuER1YIFrSLrC1YcrPD6PiqHykpVuDGUxAjzKOoRKvcM+I2kvR8qVltnNaTPQA
 CzctJY99FVrZ5B4bPZyTMWbKkzuNkOScoG2743qSxYLoixI9tNZ8eRIXTlz0T8Q+gLELasZ
 fkQGxRfb5PudHLSWRjhfA==
X-Spam-Flag: NO
UI-OutboundReport: notjunk:1;M01:P0:gGXBCopJGHY=;WywGOhUmnYlm9LD2n7DG2mVBvrl
 jDBRnYQ9JkueU334gO8rn9zyI10DhmIl6Bs4g2ZVQ7Zau1+ICgj/7Ug1uEoFlAWxScg1Wr6kg
 3P7ILW9jseSj9vSBNkxczKsKisshckgq8MiXFwzp9oF1pBNCpNVUNnEyeAvbq1MKBBXE5+GKD
 s0qr8QpleA/VIUGZ/3B5zGuh4pFzyxvQt7nTyDPFfn1VuB7KkjIA/xdd3wU6Ar7WZz9Y9TNhH
 vrd3veePlMADywgQp1QoHYZts056Pubu81sha0uvWSBG4Xbu4Cji529q4/AQmNVIBb/mHtBi/
 2M6DbU4GoNizXMamvTMPGek9B2I+8TMvwA3LCEshZ66jij4kUBbVG4GewZ9aAGLFsFoLWlC1d
 tCOrPgpzHt254o88fZdKkXaioO1bjRYpKkM14PO5rNf6JEL/0xg3zDKyYliWAi4FGfa4fp4jE
 cwipLtI4v8DG8qDr4UAz/S1XGmXFOE1VpC4bClHh3/m18RviMsczvkp1lRxjaH0XOXYk40cf2
 votUCUH7ajw48qLxADcqPBoWzo7fSfQwg+vq5yeNJh3Ip/XAmiDdq1WYEM8OJ1eNd3VxmxHrR
 NT3Ckh36cdTeGrJWpfBcFXaPpjp2J0xxzulmiNtHlrYxJzL0ghz/JVogM93lSGW7vU5yUP0W9
 pdqH4HfTX6Ev0kSlcagI0yg87VHI6t1pracCKQ/GWvE4c9qUAr/7Ekqvwhkao92cxTLerdIUY
 gYkB+1ez75Ry7wrGzJOBOkKYrFzXBH7q/c67yOVB36fGOysZoOppoJDY80Ecr/6+Moa1ag7vK
 ylJNFqSnJ1FKhfsoe4eXdAJsBzdJB4Xp6C9mMZ39g1qkE5XRuVdL3nngVo7WHeKCCp8e8hfGf
 wu29NN7aeaK5FSYZhgxGriPDvpN8lH/bHwjOnD5mbtab/5VvqVX08SEHjiKwCTsa4KStZGF9/
 ojl2bKl9bXLt8bgYbC461BRCNWA=
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 61730
Cc: mattias.engdegard@HIDDEN, 61730 <at> debbugs.gnu.org, rms@HIDDEN,
 monnier@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Eli Zaretskii <eliz@HIDDEN> writes:

> > What's your opinion about the case of non-destructive functions - is it
> > ok if we would always warn about thrown away return values of calls of
> > them?
>
> What are "non-destructive functions" in this context?

I mean all functions with either no side effects or such which may alter
original list structures but in unpredictable ways so that only the
return value is ever useful.

Michael.





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#61730; Package emacs. Full text available.

Message received at 61730 <at> debbugs.gnu.org:


Received: (at 61730) by debbugs.gnu.org; 25 Feb 2023 13:26:24 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Feb 25 08:26:24 2023
Received: from localhost ([127.0.0.1]:39349 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pVuZE-0007Bw-6k
	for submit <at> debbugs.gnu.org; Sat, 25 Feb 2023 08:26:24 -0500
Received: from eggs.gnu.org ([209.51.188.92]:42630)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1pVuZC-0007Bj-Or
 for 61730 <at> debbugs.gnu.org; Sat, 25 Feb 2023 08:26:23 -0500
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 <eliz@HIDDEN>)
 id 1pVuZ1-0000Vi-Ms; Sat, 25 Feb 2023 08:26:16 -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=KvQh4DgC6u/Brg6ODFGlVpm1VHRyjoBMtTZGrGUZNXM=; b=GMXvZbYEgeCI
 N4SFCsasUUtGf2w8OJjvGNoxgTEHo3aU5azsfbRh5AqCFNIoscQP9yB0lJ7EYl9aWO8Da4FZUjPj6
 FEhCILXLGI3b88tK/j74DAgz0rEX2hI07cojGN0LKIbZEobmNbJoTaZogMok+7K1fu0SBy1o+Matt
 cgJ+TCKpi50erZ8zo5sE+i6y7IoCgktSUcXJ2x6C62yfaFztlmcHFKMFx8IXk3T9l2mteBNqtWpdy
 rg3ssS97M2LROpYcyzVVM7v3n7Shnzn3tjYev3ALQ2P/VtTu1DYR55Gj1Rsp8v+hKDMjmso4IC6mz
 uB0ZfTVHzJRKXFYLDCuhag==;
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 <eliz@HIDDEN>)
 id 1pVuYj-00048D-FO; Sat, 25 Feb 2023 08:25:57 -0500
Date: Sat, 25 Feb 2023 15:25:56 +0200
Message-Id: <835ybplvvf.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Michael Heerdegen <michael_heerdegen@HIDDEN>
In-Reply-To: <87k005gbys.fsf@HIDDEN> (message from Michael Heerdegen on Sat,
 25 Feb 2023 13:34:51 +0100)
Subject: Re: bug#61730: 30.0.50; Compiler warnings for delq and delete
References: <87ilfsisje.fsf@HIDDEN>
 <670D8E4A-333D-4E2D-97CC-86728965989D@HIDDEN>
 <83a613np4p.fsf@HIDDEN> <87fsavf688.fsf@HIDDEN>
 <E1pVlyW-0004QZ-Av@HIDDEN> <83k006kvv6.fsf@HIDDEN>
 <87k005gbys.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 61730
Cc: mattias.engdegard@HIDDEN, 61730 <at> debbugs.gnu.org, rms@HIDDEN,
 monnier@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Michael Heerdegen <michael_heerdegen@HIDDEN>
> Cc: rms@HIDDEN,  mattias.engdegard@HIDDEN,  61730 <at> debbugs.gnu.org,
>   monnier@HIDDEN
> Date: Sat, 25 Feb 2023 13:34:51 +0100
> 
> Eli Zaretskii <eliz@HIDDEN> writes:
> 
> > In Emacs maintenance and development, the two cases are actually one.
> > We rebuild Emacs so frequently that even a "rare" warning appears all
> > the time and is annoying.  It is not a coincidence that we usually
> > don't tolerate warnings during the build of Emacs.
> 
> What's your opinion about the case of non-destructive functions - is it
> ok if we would always warn about thrown away return values of calls of
> them?

What are "non-destructive functions" in this context?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#61730; Package emacs. Full text available.

Message received at 61730 <at> debbugs.gnu.org:


Received: (at 61730) by debbugs.gnu.org; 25 Feb 2023 12:35:11 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Feb 25 07:35:11 2023
Received: from localhost ([127.0.0.1]:39322 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pVtlf-0005qX-BP
	for submit <at> debbugs.gnu.org; Sat, 25 Feb 2023 07:35:11 -0500
Received: from mout.web.de ([217.72.192.78]:43915)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <michael_heerdegen@HIDDEN>) id 1pVtlc-0005qE-TO
 for 61730 <at> debbugs.gnu.org; Sat, 25 Feb 2023 07:35:09 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=s29768273;
 t=1677328495; i=michael_heerdegen@HIDDEN;
 bh=0g0o2J9Ajzfs+jKSyKEws1PhgBUKMjgqx8Chzh08rIc=;
 h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date;
 b=e2onqjHQCSH+ngSsvGSl+O8C9q7hIIKmkjM3WVPHwXnYDHq4wRW19nq0t8ck8jXsP
 jHf7ATsQv5D7GOs+VcHCFT2AZtYU9xbfwlu2Ju3uEhjyiF1tuLNH71lUowWzC+uhmK
 /YI7nepyhlq5gPnfP/6yJdmiqpiEFDVP3zmj/DHgYks+rNqZ5lULU19h2Bz7sh2vS4
 WMhrvi08lPGNzEhlLLaJTALLr8XPNe6JNSZeyl3TdHsw9PU7G37qyf2l/zMd4i8MsG
 KplAMQBkIeGE5/7zyBYwA9bXxEeaZUABkmUfx362eLDGq3J7x+CYoIxlY7oJaVrusU
 qRRR9avRCP1kg==
X-UI-Sender-Class: 814a7b36-bfc1-4dae-8640-3722d8ec6cd6
Received: from drachen.dragon ([84.59.210.57]) by smtp.web.de (mrweb106
 [213.165.67.124]) with ESMTPSA (Nemesis) id 1M604f-1pP3LB3lAB-007Ln8; Sat, 25
 Feb 2023 13:34:54 +0100
From: Michael Heerdegen <michael_heerdegen@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#61730: 30.0.50; Compiler warnings for delq and delete
In-Reply-To: <83k006kvv6.fsf@HIDDEN> (Eli Zaretskii's message of "Sat, 25 Feb
 2023 10:11:25 +0200")
References: <87ilfsisje.fsf@HIDDEN>
 <670D8E4A-333D-4E2D-97CC-86728965989D@HIDDEN>
 <83a613np4p.fsf@HIDDEN> <87fsavf688.fsf@HIDDEN>
 <E1pVlyW-0004QZ-Av@HIDDEN> <83k006kvv6.fsf@HIDDEN>
Date: Sat, 25 Feb 2023 13:34:51 +0100
Message-ID: <87k005gbys.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-Provags-ID: V03:K1:w9YoKvdPA1KiQtfPb8Nsp6pAvikTGAi9fVI9WiVy09Qcvbqn82r
 zd6NBmHvln1QlWSsocbAs3NcKTFODQb7h2asKeuwv/R5IlWOjP9Ad0zjHF+6w/9ilcvg87t
 0j0LQRj8Pph8L3xB8qi7fpprOnXXCVjDqF4P7+q4Hpqflo41JIdPkaiZDjIm1+UVR9Lo/jh
 nb4GoKpPbmVerTPPfZgNg==
X-Spam-Flag: NO
UI-OutboundReport: notjunk:1;M01:P0:nkre6DuUZwg=;FfwKyI6pPSdvU08wLCq5ep/hLnZ
 qAbgpcKj078o5zD2udRk4YuA84PI7h4ZqtzlSztdY9NWbQaxXsIP6kSE3QOo/gr64OGS+aVoq
 QHSAPhTw1JCai2LMRjCHe4LB3Yn8ya2MlmKZ1wxLOLuCkk0UN9hFmZUjFMvihkEDlpU5HhwtJ
 mfDnPvUOEFJDRFjJ6vSmrGEiJbkimrWulolGCGaRY1wBthuVOB7xy6jXxB6vXxK40OgL1I/se
 v3RkDJkVYiG15P/yH1ql/FqCMQlPk+bc/ePUK2eFsM2LFwOt85dkNzet34tjlDdxJa5Xk3L9Z
 SiWkSGhi+D5SHv1hDqqP4SNd5Q2TjW5R16yGQOJd9W4d/Lyru8fKLAoYdlWzzT/oD5Egq5aSu
 r0zdOXSwAstzkxNTK71mhXBOvBw/pYBshgv77m+8XpmPuyPJMJzLJ90SVzMxWqYULPbcWNo0r
 4nGIjSiSpLh+8WXc9H6eNBIjy2foY5qLGFP9Hav5PZaT/KDO0uXbG/4fg/K6E2Wh9mhpOjmTS
 yx/48qmPaUZxMs4K0pTJiabgZjHhtpEnynzFSn4ZG9Ud1Wj8mXeZ1XavbmB4hAuV8hinkB9uG
 aTQlxqmv8sxUzZ6g8gDOirNJSmdFwWrr1CVB0jPYq7o+zRRQcftwD7/8yevvjIwzmh9KKSXhW
 feUBWfP6JyuakzVfZ0y3l4ht9cz+ER088tPbrxgcs69bROA7QYkNzjXcBdcJ6xTdmwCq45RyD
 eEss/frE9Z9gcX/Tt0qVnTAVjQWhzOyEpL9+Mo9q6YEHkrCZe3ufojCxyp81+D71o4WpfvJwp
 goqUr5MnzK32lnbxMYrO6KAmckb4xtmP80RcdUaMtc0WJhxWkkatrP1UJ+Snfw9pxPgF9n/Gv
 p2YXmc9BQJxtrkkIu+bjuKqou/fsIkRP1zhTAmZegzCMs2amJ3biB8L8F7+WHNOYavfTliXtP
 THU37j2v3RnFLVRIrYRC2/vcZt4=
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 61730
Cc: mattias.engdegard@HIDDEN, 61730 <at> debbugs.gnu.org, rms@HIDDEN,
 monnier@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Eli Zaretskii <eliz@HIDDEN> writes:

> In Emacs maintenance and development, the two cases are actually one.
> We rebuild Emacs so frequently that even a "rare" warning appears all
> the time and is annoying.  It is not a coincidence that we usually
> don't tolerate warnings during the build of Emacs.

What's your opinion about the case of non-destructive functions - is it
ok if we would always warn about thrown away return values of calls of
them?

Michael.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#61730; Package emacs. Full text available.

Message received at 61730 <at> debbugs.gnu.org:


Received: (at 61730) by debbugs.gnu.org; 25 Feb 2023 09:41:08 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Feb 25 04:41:08 2023
Received: from localhost ([127.0.0.1]:39046 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pVr3E-0006iI-Bq
	for submit <at> debbugs.gnu.org; Sat, 25 Feb 2023 04:41:08 -0500
Received: from mail-lf1-f42.google.com ([209.85.167.42]:34424)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <mattias.engdegard@HIDDEN>) id 1pVr3C-0006hc-6z
 for 61730 <at> debbugs.gnu.org; Sat, 25 Feb 2023 04:41:07 -0500
Received: by mail-lf1-f42.google.com with SMTP id t11so2291415lfr.1
 for <61730 <at> debbugs.gnu.org>; Sat, 25 Feb 2023 01:41:06 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 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=JNZE0Q2BEWMENHDPw8LOMJ7fvcNCJxI911fO5fXpWXQ=;
 b=j4HjbhoiYuflrcZV92n0wE4LUtNQLDxsJIgKLSD2zwZAPw8BCSrpVHHKnWoeSDK88C
 L2UBn0mgcD/HW7sCWASFT4niUNJNmC/h5gCCzLHZsweoarVSxr32u8HOMNG4ZTCTW244
 YDubd2NZn2dQmuAMUaM/aRIxynrs3G930nWFtVM+1IVN3qOXdAyawy23ICdZGUMvU75X
 d8YTaERXtoFe+VWVNaRA4bjHIDW83bFTugOG+gZlYPJxTMGjgQ8dvyw+VD5tSM2kqBUG
 hhZSBv2f9B3wTN28AT9rlUWpRFI1RMGw86yuHCwnSN8WRyC9V8gVRyIygkSG7HavBB0w
 ELyA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 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=JNZE0Q2BEWMENHDPw8LOMJ7fvcNCJxI911fO5fXpWXQ=;
 b=OLOVmiiugYHh7eCwppdTc3iy4TZqb7pucXkIJFAICVq9kRMMQVKauhHcCHPhrPlUp5
 aHyORBzHmfBIHQm0UH80vTvR8qiC+7iUifHst6xwdKI2mNLUqalPqIm3BZJyjK9g7Oht
 vauzrIYfSMMRqM+dQkTx6gUbXSBufuIOOm/GLXjAYkkNPvoPTXYPVZ64RnhN/cdjZRkw
 z2l2Pn+yFHyU63svsh4mohnxC6S7SlUJ3FCHsfP2Zus1IxEq50qF3rTnHT6burAJV9EC
 q+F4QEVBt74qjCl4A4bTEAQIPDUFyEMy3Qfiuq22Kj16VSPc2WvOECImbUBbMfiF4Rfw
 qOQA==
X-Gm-Message-State: AO0yUKVvx6kDP0YbGwJF61Ya2+S5SWal1yhOGZUmrxCrZ+NNKznrSiMF
 6XD1uMnu2O3sbj5UF9D45Rw=
X-Google-Smtp-Source: AK7set9f1+kfgRQtpcHJmqBTQmTb38xUMphxypaOSMoSgoR3Esec/sryour0MKk+mtz6lWnWjaUOqw==
X-Received: by 2002:a19:f60e:0:b0:4db:2ac7:d372 with SMTP id
 x14-20020a19f60e000000b004db2ac7d372mr6245042lfe.55.1677318059748; 
 Sat, 25 Feb 2023 01:40:59 -0800 (PST)
Received: from smtpclient.apple (c188-150-171-209.bredband.tele2.se.
 [188.150.171.209]) by smtp.gmail.com with ESMTPSA id
 f15-20020ac2508f000000b004d85789cef1sm165495lfm.49.2023.02.25.01.40.59
 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128);
 Sat, 25 Feb 2023 01:40:59 -0800 (PST)
Content-Type: text/plain;
	charset=us-ascii
Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.14\))
Subject: Re: bug#61730: 30.0.50; Compiler warnings for delq and delete
From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= <mattias.engdegard@HIDDEN>
In-Reply-To: <jwvedqeddfb.fsf-monnier+emacs@HIDDEN>
Date: Sat, 25 Feb 2023 10:40:58 +0100
Content-Transfer-Encoding: quoted-printable
Message-Id: <DF7E4233-CC8F-42CC-BEF3-F0B712464689@HIDDEN>
References: <87ilfsisje.fsf@HIDDEN>
 <670D8E4A-333D-4E2D-97CC-86728965989D@HIDDEN> <83a613np4p.fsf@HIDDEN>
 <87fsavf688.fsf@HIDDEN> <831qmfnkto.fsf@HIDDEN> <87bkljf4oh.fsf@HIDDEN>
 <83zg93m5e4.fsf@HIDDEN> <877cw7f37n.fsf@HIDDEN> <87v8jrdnbp.fsf@HIDDEN>
 <0D5624BF-D54B-44EB-AC3D-09A9068CF89D@HIDDEN>
 <jwvedqeddfb.fsf-monnier+emacs@HIDDEN>
To: Stefan Monnier <monnier@HIDDEN>
X-Mailer: Apple Mail (2.3654.120.0.1.14)
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 61730
Cc: Michael Heerdegen <michael_heerdegen@HIDDEN>, Eli Zaretskii <eliz@HIDDEN>,
 61730 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

24 feb. 2023 kl. 21.20 skrev Stefan Monnier <monnier@HIDDEN>:
>=20
>> -    (byte-compile-form arg t))
>> +    ;; Compile args for value (to avoid warnings about unused =
values),
>> +    ;; emit a discard after each, and trust the LAP peephole =
optimiser
>> +    ;; to annihilate useless ops.
>> +    (byte-compile-form arg)
>> +    (byte-compile-discard))
>=20
> I doubt that it will always result in the same code :-(

Not always indeed, but pretty close. Here is the complete list of .elc =
files that changed size, with their byte-code growth in bytes:

./lisp/emacs-lisp/pcase.elc 1
./lisp/eshell/esh-ext.elc 1
./lisp/emacs-lisp/bytecomp.elc 2
./lisp/mouse.elc 2
./lisp/org/org-agenda.elc 7
./lisp/emacs-lisp/cconv.elc 9

which is as good as zero. Is there a particular construct that you are =
worried about?

Most uses of (ignore ...) are for silencing unused variables, and that =
case should be more or less unchanged with the patch. The same should be =
true for using `ignore` to discard the return values of functions like =
mapcar or delete without warning.





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#61730; Package emacs. Full text available.

Message received at 61730 <at> debbugs.gnu.org:


Received: (at 61730) by debbugs.gnu.org; 25 Feb 2023 08:11:52 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Feb 25 03:11:51 2023
Received: from localhost ([127.0.0.1]:38925 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pVpep-0004Gt-Jt
	for submit <at> debbugs.gnu.org; Sat, 25 Feb 2023 03:11:51 -0500
Received: from eggs.gnu.org ([209.51.188.92]:38894)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1pVpen-0004Gc-Mz
 for 61730 <at> debbugs.gnu.org; Sat, 25 Feb 2023 03:11:50 -0500
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 <eliz@HIDDEN>)
 id 1pVpeg-00034Z-J3; Sat, 25 Feb 2023 03:11:42 -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=RP0wK1+nhdjD1A1du/tVW3//fZTlhmzeprOVQa3YCTo=; b=i6osB7EhpXv4
 Fcfl+j5ra9saHdIXvJJCM1BN9CBa21SgES9S3a27UjGRMn5zQTZLyG0MOU7Q3NyqYHblzrpybYtTP
 Kpwy2bFRaDNNohYmh2NUgBmCLkr44mo+eScNMSJlXyAt+PM7cY7eyJ5cEz4jfN4BLOtC2elaHTzuZ
 pGRTgwfpUK+tFzVWKl2GDzPtD4r71W0a+53reFiX0iIfs7Uj7cYr3NCOS562taH0cQRoxondPfpXw
 e5uIo7ohNXb0HYeyAdn9fNVDViWYZC1Gc75UWlf3HycWTwvxp25ctlCLyXtF4Jb0Bf/H8ytylN5em
 dwqLfJZKMJidY+YDuR65fg==;
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 <eliz@HIDDEN>)
 id 1pVpeO-0002DO-El; Sat, 25 Feb 2023 03:11:26 -0500
Date: Sat, 25 Feb 2023 10:11:25 +0200
Message-Id: <83k006kvv6.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: rms@HIDDEN
In-Reply-To: <E1pVlyW-0004QZ-Av@HIDDEN> (message from Richard
 Stallman on Fri, 24 Feb 2023 23:15:56 -0500)
Subject: Re: bug#61730: 30.0.50; Compiler warnings for delq and delete
References: <87ilfsisje.fsf@HIDDEN>
 <670D8E4A-333D-4E2D-97CC-86728965989D@HIDDEN>
 <83a613np4p.fsf@HIDDEN> <87fsavf688.fsf@HIDDEN>
 <E1pVlyW-0004QZ-Av@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 61730
Cc: michael_heerdegen@HIDDEN, mattias.engdegard@HIDDEN,
 61730 <at> debbugs.gnu.org, monnier@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Richard Stallman <rms@HIDDEN>
> Cc: eliz@HIDDEN, mattias.engdegard@HIDDEN, 61730 <at> debbugs.gnu.org,
> 	monnier@HIDDEN
> Date: Fri, 24 Feb 2023 23:15:56 -0500
> 
> People won't mind a rare spurious warning if the warning message
> usually indicates a real problem.  But if it is the opposite way,
> people will see the warning as annoying bureaucracy and resent it.

In Emacs maintenance and development, the two cases are actually one.
We rebuild Emacs so frequently that even a "rare" warning appears all
the time and is annoying.  It is not a coincidence that we usually
don't tolerate warnings during the build of Emacs.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#61730; Package emacs. Full text available.

Message received at 61730 <at> debbugs.gnu.org:


Received: (at 61730) by debbugs.gnu.org; 25 Feb 2023 04:16:04 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Feb 24 23:16:04 2023
Received: from localhost ([127.0.0.1]:38759 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pVlyd-0003ht-NK
	for submit <at> debbugs.gnu.org; Fri, 24 Feb 2023 23:16:03 -0500
Received: from eggs.gnu.org ([209.51.188.92]:59192)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rms@HIDDEN>) id 1pVlyc-0003hC-3i
 for 61730 <at> debbugs.gnu.org; Fri, 24 Feb 2023 23:16:02 -0500
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 <rms@HIDDEN>)
 id 1pVlyW-0006Z8-MC; Fri, 24 Feb 2023 23:15:56 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=Date:References:Subject:In-Reply-To:To:From:
 mime-version; bh=V8eW5AXNDJyqRgvYBZPiZewEWVeRJhClFDJrjqHE3AA=; b=YV+umWNlWdcL
 OOam14DHcq8xpZQQUYzAUpsK49IEbj8qgWJR1/JgT+D5/FQSsiMOxdO0XXRlqw1v6r4hXzaesfKf0
 xTn0dg0vzc1y1/C17TDUb9LAyw7GMkeOZwBqdj4Qiyrc4qXtyhK6YV3GNkL0W5ArWqFy5CkzGeVTh
 cyv8aYbPe6cL2e1ttN1DDaLdHWdbrM6Is0xI7rY48egy4ULVsR1q3jDIrCfCBsuo7kHXnLbSQrrMM
 Yoq/Q0UprO2d1XzFNgaCLaoV4XN63kYvGd+W6sBY2b2YpdR5/m7rq7TUApc43dcFZvZ6fFwlyRKMO
 6OMTIkkaZQE0J4KdlrZ6fQ==;
Received: from rms by fencepost.gnu.org with local (Exim 4.90_1)
 (envelope-from <rms@HIDDEN>)
 id 1pVlyW-0004QZ-Av; Fri, 24 Feb 2023 23:15:56 -0500
Content-Type: text/plain; charset=Utf-8
From: Richard Stallman <rms@HIDDEN>
To: Michael Heerdegen <michael_heerdegen@HIDDEN>
In-Reply-To: <87fsavf688.fsf@HIDDEN> (message from Michael Heerdegen on Fri,
 24 Feb 2023 16:11:51 +0100)
Subject: Re: bug#61730: 30.0.50; Compiler warnings for delq and delete
References: <87ilfsisje.fsf@HIDDEN>
 <670D8E4A-333D-4E2D-97CC-86728965989D@HIDDEN>
 <83a613np4p.fsf@HIDDEN> <87fsavf688.fsf@HIDDEN>
Message-Id: <E1pVlyW-0004QZ-Av@HIDDEN>
Date: Fri, 24 Feb 2023 23:15:56 -0500
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 61730
Cc: eliz@HIDDEN, 61730 <at> debbugs.gnu.org, mattias.engdegard@HIDDEN,
 monnier@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Reply-To: rms@HIDDEN
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

  > 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.

When someone wrote code like that, either person thought about the
question and determined the return value could be ignored, or person
made a mistake and introduced a bug.

How often does each of those two happen?
What fraction of these unused return values are real possible bugs?

People won't mind a rare spurious warning if the warning message
usually indicates a real problem.  But if it is the opposite way,
people will see the warning as annoying bureaucracy and resent it.

Can we come up with a conventional way to indicate you know
you're ignoring the return value and you've concluded it is safe?
For instance, using it as the arg of `ignore'?


-- 
Dr Richard Stallman (https://stallman.org)
Chief GNUisance of the GNU Project (https://gnu.org)
Founder, Free Software Foundation (https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)






Information forwarded to bug-gnu-emacs@HIDDEN:
bug#61730; Package emacs. Full text available.

Message received at 61730 <at> debbugs.gnu.org:


Received: (at 61730) by debbugs.gnu.org; 24 Feb 2023 20:20:15 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Feb 24 15:20:14 2023
Received: from localhost ([127.0.0.1]:38325 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pVeYA-0000bL-N0
	for submit <at> debbugs.gnu.org; Fri, 24 Feb 2023 15:20:14 -0500
Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:8868)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <monnier@HIDDEN>) id 1pVeY8-0000b5-OR
 for 61730 <at> debbugs.gnu.org; Fri, 24 Feb 2023 15:20:13 -0500
Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1])
 by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 56E301000CA;
 Fri, 24 Feb 2023 15:20:07 -0500 (EST)
Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1])
 by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id DAEC810001F;
 Fri, 24 Feb 2023 15:20:05 -0500 (EST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca;
 s=mail; t=1677270005;
 bh=4+NPtLsqmvTv7QDOLrN2lU9VirOkSCBGWIOdn5kM0gU=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date:From;
 b=XU3/+YfXvhMmgn9jMDLA2BooVmGIkeAVTuJfAoq7jBrf3dY2fcQWvauG/S177O8nq
 uP9BkdBeywKvC5sDGdOqYQlqzfWF2GqPs7uEULdqCW8Z2od4L6WEtv9WlAVJv7yyKe
 NDf5XjupxjKW05liwvFKLfsJbplKRiFjFfW0kttq6fz+vjOLg6fyc/LHDTilwjAsyy
 NNEaQRXTOLbzpc7cCRlDTrNvCtI5PBzTMojiYx20nZvDE4O+KPtjoEkgyOvzpOM/T8
 lQZ/sxe0iQOOouwmpNgRiyBAVJFW+8DhphAj0/TSkbNIgqSknxyTK9daNrywomHv2s
 rMyE+bPjKwHiw==
Received: from pastel (unknown [216.154.34.24])
 by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 9E6C1123247;
 Fri, 24 Feb 2023 15:20:05 -0500 (EST)
From: Stefan Monnier <monnier@HIDDEN>
To: Mattias =?windows-1252?Q?Engdeg=E5rd?= <mattias.engdegard@HIDDEN>
Subject: Re: bug#61730: 30.0.50; Compiler warnings for delq and delete
In-Reply-To: <0D5624BF-D54B-44EB-AC3D-09A9068CF89D@HIDDEN> ("Mattias
 =?windows-1252?Q?Engdeg=E5rd=22's?= message of "Fri, 24 Feb 2023 20:33:27
 +0100")
Message-ID: <jwvedqeddfb.fsf-monnier+emacs@HIDDEN>
References: <87ilfsisje.fsf@HIDDEN>
 <670D8E4A-333D-4E2D-97CC-86728965989D@HIDDEN>
 <83a613np4p.fsf@HIDDEN> <87fsavf688.fsf@HIDDEN>
 <831qmfnkto.fsf@HIDDEN> <87bkljf4oh.fsf@HIDDEN>
 <83zg93m5e4.fsf@HIDDEN> <877cw7f37n.fsf@HIDDEN>
 <87v8jrdnbp.fsf@HIDDEN>
 <0D5624BF-D54B-44EB-AC3D-09A9068CF89D@HIDDEN>
Date: Fri, 24 Feb 2023 15:20:04 -0500
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-SPAM-INFO: Spam detection results:  0
 ALL_TRUSTED                -1 Passed through trusted hosts only via SMTP
 AWL -0.061 Adjusted score from AWL reputation of From: address
 BAYES_00                 -1.9 Bayes spam probability is 0 to 1%
 DKIM_SIGNED               0.1 Message has a DKIM or DK signature,
 not necessarily valid
 DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature
 DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's
 domain
X-SPAM-LEVEL: 
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 61730
Cc: Michael Heerdegen <michael_heerdegen@HIDDEN>, Eli Zaretskii <eliz@HIDDEN>,
 61730 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> -    (byte-compile-form arg t))
> +    ;; Compile args for value (to avoid warnings about unused values),
> +    ;; emit a discard after each, and trust the LAP peephole optimiser
> +    ;; to annihilate useless ops.
> +    (byte-compile-form arg)
> +    (byte-compile-discard))

I doubt that it will always result in the same code :-(


        Stefan





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#61730; Package emacs. Full text available.

Message received at 61730 <at> debbugs.gnu.org:


Received: (at 61730) by debbugs.gnu.org; 24 Feb 2023 19:33:37 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Feb 24 14:33:37 2023
Received: from localhost ([127.0.0.1]:38267 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pVdp3-0007rl-89
	for submit <at> debbugs.gnu.org; Fri, 24 Feb 2023 14:33:37 -0500
Received: from mail-lf1-f53.google.com ([209.85.167.53]:36545)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <mattias.engdegard@HIDDEN>) id 1pVdp1-0007rV-3U
 for 61730 <at> debbugs.gnu.org; Fri, 24 Feb 2023 14:33:35 -0500
Received: by mail-lf1-f53.google.com with SMTP id f18so505359lfa.3
 for <61730 <at> debbugs.gnu.org>; Fri, 24 Feb 2023 11:33:35 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=references:to:cc:in-reply-to:date:subject:mime-version:message-id
 :from:sender:from:to:cc:subject:date:message-id:reply-to;
 bh=s9K9FH4fnd+8SDudr41eKZWgqbxNsThnAkq3GJGAQmg=;
 b=GV09t8Kj0mdLUxSFuyD/Z4u51zEIx/wxhj9eBfLKjZImmFuZsSj67V+D4YUE2STJyq
 KZ2fqrQ2ZzwQbTDC4VA7QneuoLKgoUgazozTgp5UjdxZnSQe+rrzZzBoMwVCfH5eqi67
 95yP/0UymzEz7ucJvbbjog3yfnSFkN1z+ZbU2rQJuw7SFJqTc0TbqCC6JPV19+NyShGM
 31IPSlv56VGEGWTCt/8T9w/HYvW9QrbSnNHSZ0PRPiY5CaZuisJ80qKzYaUWLQ6M0Ga5
 lZE8Mf7IWcGJKQ1H42eWnk17hzqcjTUMDP1CZYS8af9cAOqcyvfWUUv49mw3BQn9kctd
 WMBQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=references:to:cc:in-reply-to:date:subject:mime-version:message-id
 :from:sender:x-gm-message-state:from:to:cc:subject:date:message-id
 :reply-to;
 bh=s9K9FH4fnd+8SDudr41eKZWgqbxNsThnAkq3GJGAQmg=;
 b=zak3xwThfySfm4NRqyM6HbqeNsjt94FYicSU+3h88W2qr7SpZtPnb9iR6/r58Gt0je
 Pxp9SEPKsFSmlrAUVFopxvofpj8HtlS/aB3LODbsBrZCw7lHmY4ZPOcCweAUdLT9ylBm
 2PM5zcU3hNqKi9inrCwBfDfp/xNn7g+ZnJsM/lxpMJauct8vA61Br4RKedx6w6kpUwHC
 ridDFfMW0r+PKqjOs/RaT/mw59N/XeZgQfnJNu2tDs/33DZXP7scMooW6lrs/3CrubeX
 s0Ze7kLOT+9HHw/a7Qfb3y9Pm3f9T7O1SM/V40yCewl19I16ZVSOJ0Hy+hn9lv1SFFoU
 tz/g==
X-Gm-Message-State: AO0yUKUheM7omJVNVH7G/sTyigzx151g2gwx1xBa6xQ3eNUME3JEVwNi
 4o8cmMSfgaOTz+KmRKi8p+s=
X-Google-Smtp-Source: AK7set9oEp/ogiKp5W4tCIpkp3OTa1PtCLOEkPC0SSQo31ptMjVvx9eLj+d2mnNA+qDcm11XvyBryg==
X-Received: by 2002:ac2:44a3:0:b0:4d9:8773:7d6f with SMTP id
 c3-20020ac244a3000000b004d987737d6fmr5748403lfm.19.1677267208723; 
 Fri, 24 Feb 2023 11:33:28 -0800 (PST)
Received: from smtpclient.apple (c188-150-171-209.bredband.tele2.se.
 [188.150.171.209]) by smtp.gmail.com with ESMTPSA id
 n17-20020a195511000000b004dda74162a8sm447812lfe.40.2023.02.24.11.33.27
 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128);
 Fri, 24 Feb 2023 11:33:28 -0800 (PST)
From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= <mattias.engdegard@HIDDEN>
Message-Id: <0D5624BF-D54B-44EB-AC3D-09A9068CF89D@HIDDEN>
Content-Type: multipart/mixed;
 boundary="Apple-Mail=_E18701A5-BFB5-4DA2-BC72-41FD949D898D"
Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.14\))
Subject: Re: bug#61730: 30.0.50; Compiler warnings for delq and delete
Date: Fri, 24 Feb 2023 20:33:27 +0100
In-Reply-To: <87v8jrdnbp.fsf@HIDDEN>
To: Michael Heerdegen <michael_heerdegen@HIDDEN>
References: <87ilfsisje.fsf@HIDDEN>
 <670D8E4A-333D-4E2D-97CC-86728965989D@HIDDEN> <83a613np4p.fsf@HIDDEN>
 <87fsavf688.fsf@HIDDEN> <831qmfnkto.fsf@HIDDEN> <87bkljf4oh.fsf@HIDDEN>
 <83zg93m5e4.fsf@HIDDEN> <877cw7f37n.fsf@HIDDEN> <87v8jrdnbp.fsf@HIDDEN>
X-Mailer: Apple Mail (2.3654.120.0.1.14)
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 61730
Cc: Eli Zaretskii <eliz@HIDDEN>, 61730 <at> debbugs.gnu.org,
 monnier@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)


--Apple-Mail=_E18701A5-BFB5-4DA2-BC72-41FD949D898D
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=us-ascii

24 feb. 2023 kl. 17.45 skrev Michael Heerdegen =
<michael_heerdegen@HIDDEN>:

> Instead of "(setq _ ..." you could better use "(ignore ..."

I would very much like `ignore` to work that way but it currently =
doesn't. This is probably a bug. Stefan, what about the attached patch?

(I already pushed a fix for proper for-effect behaviour of =
with-suppressed-warnings to master; hope that is all right.)


--Apple-Mail=_E18701A5-BFB5-4DA2-BC72-41FD949D898D
Content-Disposition: attachment;
	filename=compile-ignore.diff
Content-Type: application/octet-stream;
	x-unix-mode=0644;
	name="compile-ignore.diff"
Content-Transfer-Encoding: 7bit

diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el
index 095468ad978..457efe73886 100644
--- a/lisp/emacs-lisp/bytecomp.el
+++ b/lisp/emacs-lisp/bytecomp.el
@@ -4329,7 +4329,11 @@ byte-compile-goto-if
 
 (defun byte-compile-ignore (form)
   (dolist (arg (cdr form))
-    (byte-compile-form arg t))
+    ;; Compile args for value (to avoid warnings about unused values),
+    ;; emit a discard after each, and trust the LAP peephole optimiser
+    ;; to annihilate useless ops.
+    (byte-compile-form arg)
+    (byte-compile-discard))
   (byte-compile-form nil))
 
 ;; Return the list of items in CONDITION-PARAM that match PRED-LIST.

--Apple-Mail=_E18701A5-BFB5-4DA2-BC72-41FD949D898D--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#61730; Package emacs. Full text available.

Message received at 61730 <at> debbugs.gnu.org:


Received: (at 61730) by debbugs.gnu.org; 24 Feb 2023 16:45:52 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Feb 24 11:45:52 2023
Received: from localhost ([127.0.0.1]:38100 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pVbCi-0003L1-74
	for submit <at> debbugs.gnu.org; Fri, 24 Feb 2023 11:45:52 -0500
Received: from mout.web.de ([212.227.17.12]:35793)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <michael_heerdegen@HIDDEN>) id 1pVbCe-0003Kk-0h
 for 61730 <at> debbugs.gnu.org; Fri, 24 Feb 2023 11:45:50 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=s29768273;
 t=1677257138; i=michael_heerdegen@HIDDEN;
 bh=xmaau8URqsbAepPz4QMSfeV8VffIEluNnAIC9vWGfdY=;
 h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date;
 b=ZlXDbqZk7AU2sUfVipGJQFt+PHOa3ZgK84UXG6LEQol33Ihtbf0rucq+PiUPFeDUO
 EPPmgxSuGVxGgCfpeU/eei0THxKA2KqerpccRQCCkxP+qZAwaW/9A5xEIn03gegq1l
 OkR8CWGpsd/b0PrqyG6438+J+bPwvBDDAd/uQ0B6smUJSQlBw+nBO71WMpBmZJVzFb
 HDX2u42OuWGH0McvVhDPfH2IpVx8ifFikDc1ES4b5Lw87hxiq6k/nnxEMA0YyiWqx2
 GKjVSXlazYiPzzUlgd5VyvkQpBTnDHSieRGu+WA+xW/keSLxmVJXSqgG4xcDzU0JMJ
 6z9B4XkcMIS4Q==
X-UI-Sender-Class: 814a7b36-bfc1-4dae-8640-3722d8ec6cd6
Received: from drachen.dragon ([84.59.210.57]) by smtp.web.de (mrweb105
 [213.165.67.124]) with ESMTPSA (Nemesis) id 1MFs1t-1pI6Wr3NWx-00HanK; Fri, 24
 Feb 2023 17:45:38 +0100
From: Michael Heerdegen <michael_heerdegen@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#61730: 30.0.50; Compiler warnings for delq and delete
In-Reply-To: <877cw7f37n.fsf@HIDDEN> (Michael Heerdegen's message of "Fri, 24
 Feb 2023 17:17:00 +0100")
References: <87ilfsisje.fsf@HIDDEN>
 <670D8E4A-333D-4E2D-97CC-86728965989D@HIDDEN>
 <83a613np4p.fsf@HIDDEN> <87fsavf688.fsf@HIDDEN>
 <831qmfnkto.fsf@HIDDEN> <87bkljf4oh.fsf@HIDDEN>
 <83zg93m5e4.fsf@HIDDEN> <877cw7f37n.fsf@HIDDEN>
Date: Fri, 24 Feb 2023 17:45:30 +0100
Message-ID: <87v8jrdnbp.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-Provags-ID: V03:K1:rOPy9iB2YflgoHoZSea1QVKpz/obBXEf6EbIa2afJ4zHVlxApf7
 LvGXnNJLSr7hJIh0Ur7bGeE4k4OObPxbAhIajC6RMdl1gfIJ7B/O/yby1QzzS8nfKQKUaFI
 KuT2/mpGHUjD/UFwuqHQsMfiqB5Ntmim18y1sqyKyAxzxSachLrAUh5Go9/A/XBuDuvkMgD
 i53PZRgNXAR8B+VEg1ftQ==
X-Spam-Flag: NO
UI-OutboundReport: notjunk:1;M01:P0:aKE9PFjS2F8=;sFhcwSDjX9Ihk5YX3C3YuiLPfFO
 qyUYDP44BCt40HXo/JmzS4amTfKtjejHDmZT/rpzXyvPmxjMqiqs0uQm32swtldX/35rlug/w
 SGf5l8SMO/qkQ9dI6unI0n3FV2fZW78JRn17U0OwoHjpJ1R/RvnPDj7LZGtw+A4t98fvlmhBm
 hszDTyIru75XLxDlK90Iukt88yv2iQ8XJx2Y7FK97iZPKEA6SLILsJcQ7HjAykhC1Jot4HJh7
 fEwLxgVx7wg/xJrVubNSNqQTULWyex5qspcpxr7AI1GogOqPpTYOxXB+qHUWRVxl/AmO1kUsQ
 aBQtOABvRQGWeRGhSb0BVJ6qMXduQDdA1MynhyvGmqbshpsOKB0h80xEMprIBPbfKae9kRFl3
 kMVTO657xQ922QGpUfCzOxtn1OuqazB1Jj4cpZyxdzGxpRpR9UdUxlUHfNsrCHE3MC0D1Hn1a
 e9oDgnqYI4IAP5O9FvIG4k6Uh3HodZCBS//PcbcjK8UjW4VEiEd0Bat/b0R8zAUUX756yZY7j
 +D3ECl6lRNBaGA8noaZq535ElQLxtPRy2hyFgCTeSGzTK0Xb1fcsTm8Hoye4wlZct561Ir7sI
 y/I82U0bMp4b5+IhBinwa95ojoH3/46gOmNbLkjqmDk6j0bxMP+otapTSYIn6UUbEXd3NFfBz
 ppCjcvn54bI/6ELjmaJEPdL99Mij1KZuwjqq0Ng5qq6QxYdKF/PQCzV/t9dBEzL2LmN07G5Yu
 Q5UppgS7S4tRN/ENvzr6u2OLZkwBdFXctjbtvXsc3rkfLy5qOSiugyQ7oYzaLwoN20J2818CT
 z7vK6jRsOHiG6Fjqamo2H8lNOq6uUVH+zqfCwZsOcgCAFikvgDmktEcQHk3wt5W2Nd/AF00Jr
 Fx55etEXsUjGuWPHZ7hN8M5zdliVMJT4DRAfC7P3T8EyRBOWjMJGX5nPxvbuDpeJc447aaNkh
 WrSQHpeadukjPWch6O2mlGUCkmI=
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 61730
Cc: mattias.engdegard@HIDDEN, 61730 <at> debbugs.gnu.org,
 monnier@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Michael Heerdegen <michael_heerdegen@HIDDEN> writes:

> Eli Zaretskii <eliz@HIDDEN> writes:
>
> > Even though my-list is never used again in the program?  How is this
> > better than "(setq _ ..."?
>
> This case is indeed a matter of personal style.
>
> If you modify some list and throw away the return value, the program is
> likely to refer to the place again, though, not necessarily in the same
> function.

Instead of "(setq _ ..." you could better use "(ignore ..." which would
also serve as a hint to the reader: "the return value is ignored
intentionally, this destructive operation is intended like it is in this
case".  That would not be bad style IMO.

Michael.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#61730; Package emacs. Full text available.

Message received at 61730 <at> debbugs.gnu.org:


Received: (at 61730) by debbugs.gnu.org; 24 Feb 2023 16:38:07 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Feb 24 11:38:07 2023
Received: from localhost ([127.0.0.1]:38084 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pVb5D-00038q-4s
	for submit <at> debbugs.gnu.org; Fri, 24 Feb 2023 11:38:07 -0500
Received: from mout.web.de ([217.72.192.78]:34769)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <michael_heerdegen@HIDDEN>) id 1pVb5B-00038K-0P
 for 61730 <at> debbugs.gnu.org; Fri, 24 Feb 2023 11:38:05 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=s29768273;
 t=1677256675; i=michael_heerdegen@HIDDEN;
 bh=eKgyNc1QgKQUnEjI9vqU7WxiTszzzk79ZtT2YPcWSrQ=;
 h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date;
 b=q5bWioZFMd1dNv8k0+Dcb3LNdSf7R8OJmT0Ff6NgkZyMLnlwgMCKGEzSp4+FgFZQv
 RF+/pz7Ehr6WNEPFN9Vhr5V92NEuNyYgqKyms+GBN9L6Shvl3dRht2cgkhU1iCP7Aa
 nfF8nOvo54/vifOkeyEZTSQNtup1Y5TFJsW+Nby3fGP5/M7if4F+91GlfcT3uxVB2z
 n4e4Bo9JKCSJYm27eOb/y23339ezCZJ1SQJFTlBHAngPiyoHFIsdFsp2kbxBzmUpyb
 hxRhAFPI9LT91g/6OrkOE0S/IZ/i6/IUs7hp6irUpI1cS45ZQzxENZ0aiPKbVBGL5B
 TV5a18YoGYeuQ==
X-UI-Sender-Class: 814a7b36-bfc1-4dae-8640-3722d8ec6cd6
Received: from drachen.dragon ([84.59.210.57]) by smtp.web.de (mrweb105
 [213.165.67.124]) with ESMTPSA (Nemesis) id 1N7xeb-1oSCNk33jP-014sVZ; Fri, 24
 Feb 2023 17:37:55 +0100
From: Michael Heerdegen <michael_heerdegen@HIDDEN>
To: Mattias =?utf-8?Q?Engdeg=C3=A5rd?= <mattias.engdegard@HIDDEN>
Subject: Re: bug#61730: 30.0.50; Compiler warnings for delq and delete
In-Reply-To: <80023A0E-9C1C-4559-9152-23CDD64181E6@HIDDEN> ("Mattias
 =?utf-8?Q?Engdeg=C3=A5rd=22's?= message of "Fri, 24 Feb 2023 16:52:36
 +0100")
References: <670D8E4A-333D-4E2D-97CC-86728965989D@HIDDEN>
 <80023A0E-9C1C-4559-9152-23CDD64181E6@HIDDEN>
Date: Fri, 24 Feb 2023 17:37:44 +0100
Message-ID: <87zg93dnon.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Provags-ID: V03:K1:KMjBR57+1hXYox71igK5tKJdrmOtVr41P6nB/n7rCniu3zOlz/j
 kCRKGF3YIJOCva+TPoSolsL74JiLBbv/dSiYMbrJdHWxNNvZ5ykSybKiFMds/8RsATYThKE
 dOGgiUAxOrCFEhPkTO6zYummsptqZNQmq4u4mln8Rz+3P2N29d1Jp/qC3V4jUeCcAGgK6sc
 FdDJaSPgNLU+bgq15wCig==
X-Spam-Flag: NO
UI-OutboundReport: notjunk:1;M01:P0:EdIfJP1DAl0=;W4fxEnPvY48CUFmHSfYU/qSLaKf
 /Yk9C3WuwW3EQNmL5Qy8dB51/bNYZtmIv1A+zW/Kl0cbKSOUPrClHKibXzJkvSl7ESFEdCMoU
 RARolQYE3a6QDhkheT4UBAvaf//UH7NgH9LY8l8+dlUpToOUgG9kMUvOSzcqR7w/aRX4HXwNG
 Jg857iw5favejVmlaqqB/HgyBZGRdqDCxXVHHGs/bST8x9wfKRhGg+0TLhIxwtkhHEhR9tlqI
 ucIC4r4enWZSrKBMOACyNp36A2VSP4trYl7T0UGmcc7TJaERQ5Y6bcVeO3OIxvXUIVCz3qNR0
 xISqhoimG/Y/wf36WoRCgRzep+QOKsBW7KDUccn74FLFug0pjFRxjiUo0pQRPfVIqeAEVYTaN
 UBnrXKyEU/nvw1aEHWKJLsY0kXqVg3cssAdKI18Q67QKbfK+TbFFj6E5PjIy2+GVymcJ5bAuI
 /lW1KtWiPEHa8Vs8VL3tpwSnZb0PNLhy6NqPPYvoMOVeWPxRYAJhQ5ogmpXau261lo5q3JrHT
 /umJ+t5a0C4eoH4/cQwlMA3TKSYPE4GOrUcvUkuvyhI3VlM38QXFiareX9cRJJOG2D5EeptJv
 hXqPGbmMtiGua3vkkjTdx2XPVSkSZpcFnrZxn31Shjhjd4QngV3FSgm/xF3j3kcMn/JPWevlI
 OQjQDxJEVvH1tHD+alAQ3WX8oouU+Btf2O9X54iw6MOGQ619hKv/FaPKGL8zoh+I3IYA3A/xR
 vlcxSnWZwhIkGWP7x6Oc8zeOZhOUy1FMT+r5ZgQ8cbSwJUioS9ki0H5INR0doiz3ieQcMKRM7
 ecXR6rw3nw+e/Ub+VntPM/464WVnB/NK/E31wThN3C7aQHlY9HoLghiIV9Cr52H8txxPM3Tyj
 iIidBoNqqbobfGrGBApQSe8kfDf9v5G5eco5PSwgA1yrsq8gpU0HJSe26xwusHvImTAsR0D5r
 oG4JD9TEy52o1BrzMUr+xSRJ9zo=
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 61730
Cc: 61730 <at> debbugs.gnu.org, Stefan Monnier <monnier@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Mattias Engdeg=C3=A5rd <mattias.engdegard@HIDDEN> writes:

> As promised, here is a first draft.

Cool, thanks.

> The false positive rate seems indeed to be quite low.

If there are more false than correct uses among the reported cases,
enabling this kind of warning all the time might be an improvement
nonetheless.

Michael.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#61730; Package emacs. Full text available.

Message received at 61730 <at> debbugs.gnu.org:


Received: (at 61730) by debbugs.gnu.org; 24 Feb 2023 16:29:47 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Feb 24 11:29:47 2023
Received: from localhost ([127.0.0.1]:38060 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pVax8-0002td-S8
	for submit <at> debbugs.gnu.org; Fri, 24 Feb 2023 11:29:47 -0500
Received: from eggs.gnu.org ([209.51.188.92]:50162)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1pVax7-0002tP-Gh
 for 61730 <at> debbugs.gnu.org; Fri, 24 Feb 2023 11:29:45 -0500
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 <eliz@HIDDEN>)
 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==;
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 <eliz@HIDDEN>)
 id 1pVaIl-00064P-U6; Fri, 24 Feb 2023 10:48:06 -0500
Date: Fri, 24 Feb 2023 17:48:03 +0200
Message-Id: <83zg93m5e4.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Michael Heerdegen <michael_heerdegen@HIDDEN>
In-Reply-To: <87bkljf4oh.fsf@HIDDEN> (message from Michael Heerdegen on Fri,
 24 Feb 2023 16:45:18 +0100)
Subject: Re: bug#61730: 30.0.50; Compiler warnings for delq and delete
References: <87ilfsisje.fsf@HIDDEN>
 <670D8E4A-333D-4E2D-97CC-86728965989D@HIDDEN>
 <83a613np4p.fsf@HIDDEN> <87fsavf688.fsf@HIDDEN>
 <831qmfnkto.fsf@HIDDEN> <87bkljf4oh.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 61730
Cc: mattias.engdegard@HIDDEN, 61730 <at> debbugs.gnu.org,
 monnier@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Michael Heerdegen <michael_heerdegen@HIDDEN>
> Cc: mattias.engdegard@HIDDEN,  61730 <at> debbugs.gnu.org,
>   monnier@HIDDEN
> Date: Fri, 24 Feb 2023 16:45:18 +0100
> 
> Eli Zaretskii <eliz@HIDDEN> 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.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#61730; Package emacs. Full text available.

Message received at 61730 <at> debbugs.gnu.org:


Received: (at 61730) by debbugs.gnu.org; 24 Feb 2023 16:17:44 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Feb 24 11:17:44 2023
Received: from localhost ([127.0.0.1]:38045 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pValU-0002cL-64
	for submit <at> debbugs.gnu.org; Fri, 24 Feb 2023 11:17:44 -0500
Received: from mout.web.de ([217.72.192.78]:42099)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <michael_heerdegen@HIDDEN>) id 1pValR-0002c2-Qq
 for 61730 <at> debbugs.gnu.org; Fri, 24 Feb 2023 11:17:42 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=s29768273;
 t=1677255450; i=michael_heerdegen@HIDDEN;
 bh=7YfBSZlixkQJnVdzDZN5e319kHB2q0sr2utzAllpeSI=;
 h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date;
 b=hQiKRRSo4C5JAfFetivb+6bM5brp72CPMFN9NdtuDhKTk9o26Z5TsKg+Td0KlCQf3
 KKWWxoWoj4QVYD7jEGixB/5A9QnaUcwzzJRch71ZqlQUCRpzvrfsDySwGSLlv2M8za
 m5EaDwmaPirgmvzAPkLUOe8WBSHIWxTtIncBk+NsrwC6xA4Cu30YQAzq6Vhc+udjrW
 64f415Bda43rpSM6+/nynSgH5FcInqUM8wO4s43ixhELE9/HYWmXlrBHno68Z74UUq
 PPTapsstOUZPg/P5Jeb89zIWcv26i5r6+sMxRtHhguNUKuylHMeKj7k/ZiUFSH3yGh
 UunvBIIhb9MSw==
X-UI-Sender-Class: 814a7b36-bfc1-4dae-8640-3722d8ec6cd6
Received: from drachen.dragon ([84.59.210.57]) by smtp.web.de (mrweb105
 [213.165.67.124]) with ESMTPSA (Nemesis) id 1MxHU2-1oY13K2Oy0-00xQYH; Fri, 24
 Feb 2023 17:17:30 +0100
From: Michael Heerdegen <michael_heerdegen@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#61730: 30.0.50; Compiler warnings for delq and delete
In-Reply-To: <83zg93m5e4.fsf@HIDDEN> (Eli Zaretskii's message of "Fri, 24 Feb
 2023 17:48:03 +0200")
References: <87ilfsisje.fsf@HIDDEN>
 <670D8E4A-333D-4E2D-97CC-86728965989D@HIDDEN>
 <83a613np4p.fsf@HIDDEN> <87fsavf688.fsf@HIDDEN>
 <831qmfnkto.fsf@HIDDEN> <87bkljf4oh.fsf@HIDDEN>
 <83zg93m5e4.fsf@HIDDEN>
Date: Fri, 24 Feb 2023 17:17:00 +0100
Message-ID: <877cw7f37n.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-Provags-ID: V03:K1:iJ7Xd0EljZ6E/sYbrRaHAHh4YqNdGVdKr8rCybGRJVkoTDh4Dnw
 04oqUgkWigu6jKTiXpm+H6hx0UYsQDTK/XwzyH6VWJS0xF1R43MDH8SsrRpYzmq4JoMuHZc
 cyyvzMC7T5T8dzHIJHfFJ4x1JXxrKg1CYcvy4lSawrH3FbHdKwBL3okPqr/kHURmmylKLXF
 knI80FhxnkTPQix73GgOw==
X-Spam-Flag: NO
UI-OutboundReport: notjunk:1;M01:P0:NePo7ap2Rok=;emckAQd8BTjgf4tddirw/pHWxIu
 EcxkXZeNJlPHlPuNaZ+YELiFkjS2ei82stoq+g1AF1YHU9GKZ56omI5Xehr4shGvHS+bh/Seq
 8kRdlth2IYHdW+S5mc9Av1XHPRkPaqiJMoalIjHyx3GY5khpUOWC7K0IWRjF699OI8u6wj2nE
 CKbbGnV1m1dwjDZU+kBVm/fqZbxETQN9QFY76HVFiiz2yjfx/9+YE6n7WXc/2GQDlASAyPpii
 IIY16v6oGfIEFSyHT24VNwsTvNDfVO/EwJKzCxHtqVpKixdXjzQrGir8rDLfpC56ETKKO6YcS
 Xew5zWkBa4eRgZYgu6OqOQ29NDw24w+GsS+xDxm/zAA5Iu47uCcKWkkRIdobpAhhrOACdjy32
 274uUQa9rs0lzg0DABQdwtamiI/gSoHDYOYxDzPLw/SmfIpKi2MnSU6QUc/GCMkkp71Eka3C1
 uWEekHPmga6XWOIukJPjbG7a4x1V4Zq+v41ZXAfBpcrC8Jo0WDyFWIQbn/MjCrLTeIitdPerq
 vSjkUHE39U2sblyzd3nrSnf7v3sc09LpvW9NsH63gngN/Km8SPYE9eFNJn2l6p3N/QDiaRYA1
 u2LLT7CcW3DWRaydIgvnLRcH4sz7IQjROocugLNLUrGqgtl5BUMtoRKipWMdH/B2kHqHLo1VE
 JeqtSCNzh1FNJIb6UquYRhV5rbamRsezT+28pYPWMs2THTIKCzKlvqoVRYWUoChIgID1cwKFq
 NdgSIQHb/GWP9TJ7rDZxPkwHqkCSb/a+8A/0CKaeRblfV2F+g8KaUcxvBJY1xAdYum2cd6EyD
 fnrFpHzsRVBwp1qVEuGIb9t/joRNKQ6qxHsCruOob60VNO5V00pQqgq3yD2em9tmOLcsUI9tj
 bnBVBEe2MZDD0f9hRI+qXxHJFN3QVkxU0wgdQxL/zKgs2ahMg2NnOyY6XYt/4ujRIMII/DV0s
 jTTLsQ==
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 61730
Cc: mattias.engdegard@HIDDEN, 61730 <at> debbugs.gnu.org,
 monnier@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Eli Zaretskii <eliz@HIDDEN> writes:

> Even though my-list is never used again in the program?  How is this
> better than "(setq _ ..."?

This case is indeed a matter of personal style.

If you modify some list and throw away the return value, the program is
likely to refer to the place again, though, not necessarily in the same
function.

Michael.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#61730; Package emacs. Full text available.

Message received at 61730 <at> debbugs.gnu.org:


Received: (at 61730) by debbugs.gnu.org; 24 Feb 2023 15:52:45 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Feb 24 10:52:45 2023
Received: from localhost ([127.0.0.1]:37986 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pVaNJ-0001uF-CO
	for submit <at> debbugs.gnu.org; Fri, 24 Feb 2023 10:52:45 -0500
Received: from mail-lf1-f54.google.com ([209.85.167.54]:40799)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <mattias.engdegard@HIDDEN>) id 1pVaNH-0001u0-Hi
 for 61730 <at> debbugs.gnu.org; Fri, 24 Feb 2023 10:52:43 -0500
Received: by mail-lf1-f54.google.com with SMTP id k14so17471805lfj.7
 for <61730 <at> debbugs.gnu.org>; Fri, 24 Feb 2023 07:52:43 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=references:to:cc:in-reply-to:date:subject:mime-version:message-id
 :from:sender:from:to:cc:subject:date:message-id:reply-to;
 bh=AZY4UrL23cCpYybjY3vMWhOPeX6ZptZodkgiZkuYcWo=;
 b=BNESq0i5AJe2o6OdyHz0G7/XAUoW/iVzWOLYLg0PHGxX9HzxpUPHNnFIzKmGTc4Zr9
 5MjkvParKmgDcn1jD9oYOZkiyvNBy/XFpiQ4zn6x9fB0Zzio2VLurGdmzpU45Jvqqu6A
 3Hejj+zyOkDhkaABrfeEqtX60srnuLe1gACHOdVsbncggQgc1dM7iqbVhed6zpYMtOti
 xjr2999mBMTsT4Rb634A8zvtpBmQ85ebj5YmX9bSmQh9i9oL/tedPYoEbW2gEoVt31j1
 0k7vlD1BCNcAmXdhSqlSlICYyUyGTgqHglYvvlhZyVciLQWjo3LC05/Y3xtmHdhKB6OW
 n3+A==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=references:to:cc:in-reply-to:date:subject:mime-version:message-id
 :from:sender:x-gm-message-state:from:to:cc:subject:date:message-id
 :reply-to;
 bh=AZY4UrL23cCpYybjY3vMWhOPeX6ZptZodkgiZkuYcWo=;
 b=NI+OGTw02HdVak8AM1E2j1632TEfXrzHTRWfuVGR9u+1JOrq+nrLNDq9pWaK5xi325
 IYSZFuAWBvVIaVp+3pVys7RTNtgidQXFhaoxleuR9JBhY0E84FwXpzZNGCDytf+EHxY/
 otYzDDmv8UfVqMnKrxmEbQYYtCC5KZpLgcwwZYuBFwPvlNyJBKLms0vVQVmG0PdCooAw
 RSXmGDjlQ6sP5KNmb29Rtcgb/VDOeYsz6H2gJMXAVV9cWad3deQyjbn32zqjMjx5FnOB
 WQgwA8AubF7ReVmsBYuv7YuGeknnJDfvX7bvzYWCcgf9/6SPZmTuOsWgW9JPbIzMHIn1
 0liA==
X-Gm-Message-State: AO0yUKUUX2Vn6cy5MyzeFn+ju3DHSm6jGyQJjztw3uRq4i590VXLLtvh
 VaihfQoZ81WM3LTfwaPmZ6Y=
X-Google-Smtp-Source: AK7set/I3F6TJF3XjjS2ZNcP5VBiL/8e6UD2gYU4+IgnQuBJrH0N6clndV4rG881m0N7oJD56yOsnA==
X-Received: by 2002:a05:6512:244:b0:4db:d6a:dea9 with SMTP id
 b4-20020a056512024400b004db0d6adea9mr6293650lfo.68.1677253957321; 
 Fri, 24 Feb 2023 07:52:37 -0800 (PST)
Received: from smtpclient.apple (c188-150-171-209.bredband.tele2.se.
 [188.150.171.209]) by smtp.gmail.com with ESMTPSA id
 a28-20020ac2521c000000b004d34238ca44sm1707879lfl.214.2023.02.24.07.52.36
 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128);
 Fri, 24 Feb 2023 07:52:36 -0800 (PST)
From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= <mattias.engdegard@HIDDEN>
Message-Id: <80023A0E-9C1C-4559-9152-23CDD64181E6@HIDDEN>
Content-Type: multipart/mixed;
 boundary="Apple-Mail=_FE12AF39-C843-46B6-8196-95E753F3668B"
Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.14\))
Subject: Re: bug#61730: 30.0.50; Compiler warnings for delq and delete
Date: Fri, 24 Feb 2023 16:52:36 +0100
In-Reply-To: <670D8E4A-333D-4E2D-97CC-86728965989D@HIDDEN>
To: Michael Heerdegen <michael_heerdegen@HIDDEN>
References: <670D8E4A-333D-4E2D-97CC-86728965989D@HIDDEN>
X-Mailer: Apple Mail (2.3654.120.0.1.14)
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 61730
Cc: 61730 <at> debbugs.gnu.org, Stefan Monnier <monnier@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)


--Apple-Mail=_FE12AF39-C843-46B6-8196-95E753F3668B
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=us-ascii

As promised, here is a first draft. The false positive rate seems indeed =
to be quite low.


--Apple-Mail=_FE12AF39-C843-46B6-8196-95E753F3668B
Content-Disposition: attachment;
	filename=warn-ignored-return-value.diff
Content-Type: application/octet-stream;
	x-unix-mode=0644;
	name="warn-ignored-return-value.diff"
Content-Transfer-Encoding: 7bit

diff --git a/lisp/emacs-lisp/byte-run.el b/lisp/emacs-lisp/byte-run.el
index 9345665eea8..fd9913d1be8 100644
--- a/lisp/emacs-lisp/byte-run.el
+++ b/lisp/emacs-lisp/byte-run.el
@@ -650,11 +650,8 @@ with-suppressed-warnings
 `byte-compile-warnings' for a fuller explanation of the warning
 types.  The types that can be suppressed with this macro are
 `free-vars', `callargs', `redefine', `obsolete',
-`interactive-only', `lexical', `mapcar', `constants',
-`suspicious' and `empty-body'.
-
-For the `mapcar' case, only the `mapcar' function can be used in
-the symbol list."
+`interactive-only', `lexical', `ignored-return-value', `constants',
+`suspicious' and `empty-body'."
   ;; Note: during compilation, this definition is overridden by the one in
   ;; byte-compile-initial-macro-environment.
   (declare (debug (sexp body)) (indent 1))
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el
index 095468ad978..5f428b8e1f9 100644
--- a/lisp/emacs-lisp/bytecomp.el
+++ b/lisp/emacs-lisp/bytecomp.el
@@ -317,7 +317,9 @@ byte-compile-warnings
   lexical-dynamic
               lexically bound variable declared dynamic elsewhere
   make-local  calls to `make-variable-buffer-local' that may be incorrect.
-  mapcar      mapcar called for effect.
+  ignored-return-value
+              function called without using the return value where this
+              is likely to be a mistake
   not-unused  warning about using variables with symbol names starting with _.
   constants   let-binding of, or assignment to, constants/nonvariables.
   docstrings  docstrings that are too wide (longer than
@@ -330,7 +332,7 @@ byte-compile-warnings
   empty-body  body argument to a special form or macro is empty.
 
 If the list begins with `not', then the remaining elements specify warnings to
-suppress.  For example, (not mapcar) will suppress warnings about mapcar.
+suppress.  For example, (not free-vars) will suppress the `free-vars' warning.
 
 The t value means \"all non experimental warning types\", and
 excludes the types in `byte-compile--emacs-build-warning-types'.
@@ -3485,11 +3487,35 @@ byte-compile-normal-call
     (byte-compile-callargs-warn form))
   (if byte-compile-generate-call-tree
       (byte-compile-annotate-call-tree form))
-  (when (and byte-compile--for-effect (eq (car form) 'mapcar)
-             (byte-compile-warning-enabled-p 'mapcar 'mapcar))
+
+  ;; We warn about ignored return values for two categories of functions:
+  ;; * Ones like `mapcar' that are side-effect-free themselves but call a
+  ;;   user-supplied function.
+  ;; * Ones like `delq' that mutate a list but whose return argument is
+  ;;   essential to use in case the start of the list has changed.
+  (when (and byte-compile--for-effect
+             (memq (car form)
+                   ;; FIXME: Maybe we should use a property instead of
+                   ;; this list.
+                   '( mapcar mapcan mapconcat
+                      assoc assoc-default
+                      delq delete delete-dups delete-consecutive-dups
+                      nconc sort
+                      cl-delete cl-delete-if cl-delete-if-not
+                      cl-delete-duplicates
+                      cl-nsubst cl-nsubst-if cl-nsubst-if-not
+                      cl-nsubstitute cl-nsubstitute-if cl-nsubstitute-if-not
+                      cl-nunion cl-nintersection
+                      cl-nset-difference cl-nset-exclusive-or
+                      cl-nreconc cl-nsublis
+                      cl-sort))
+             (byte-compile-warning-enabled-p 'ignored-return-value (car form)))
     (byte-compile-warn-x
      (car form)
-     "`mapcar' called for effect; use `mapc' or `dolist' instead"))
+     "value from call to `%s' is unused%s"
+     (car form)
+     (cond ((eq (car form) 'mapcar) "; use `mapc' or `dolist' instead")
+           (t ""))))
   (byte-compile-push-constant (car form))
   (mapc 'byte-compile-form (cdr form))	; wasteful, but faster.
   (byte-compile-out 'byte-call (length (cdr form))))
diff --git a/test/lisp/emacs-lisp/bytecomp-tests.el b/test/lisp/emacs-lisp/bytecomp-tests.el
index 4b0a714e52d..6dce3087e40 100644
--- a/test/lisp/emacs-lisp/bytecomp-tests.el
+++ b/test/lisp/emacs-lisp/bytecomp-tests.el
@@ -1420,8 +1420,8 @@ bytecomp-test--with-suppressed-warnings
    '(defun zot ()
       (mapcar #'list '(1 2 3))
       nil)
-   '((mapcar mapcar))
-   "Warning: .mapcar. called for effect")
+   '((ignored-return-value mapcar))
+   "Warning: value from call to `mapcar' is unused; use `mapc' or `dolist' instead")
 
   (test-suppression
    '(defun zot ()

--Apple-Mail=_FE12AF39-C843-46B6-8196-95E753F3668B--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#61730; Package emacs. Full text available.

Message received at 61730 <at> debbugs.gnu.org:


Received: (at 61730) by debbugs.gnu.org; 24 Feb 2023 15:48:29 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Feb 24 10:48:29 2023
Received: from localhost ([127.0.0.1]:37970 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pVaJA-0001mI-Jv
	for submit <at> debbugs.gnu.org; Fri, 24 Feb 2023 10:48:28 -0500
Received: from eggs.gnu.org ([209.51.188.92]:60068)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1pVaJ7-0001lW-VK
 for 61730 <at> debbugs.gnu.org; Fri, 24 Feb 2023 10:48:27 -0500
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 <eliz@HIDDEN>)
 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==;
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 <eliz@HIDDEN>)
 id 1pVaIl-00064P-U6; Fri, 24 Feb 2023 10:48:06 -0500
Date: Fri, 24 Feb 2023 17:48:03 +0200
Message-Id: <83zg93m5e4.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Michael Heerdegen <michael_heerdegen@HIDDEN>
In-Reply-To: <87bkljf4oh.fsf@HIDDEN> (message from Michael Heerdegen on Fri,
 24 Feb 2023 16:45:18 +0100)
Subject: Re: bug#61730: 30.0.50; Compiler warnings for delq and delete
References: <87ilfsisje.fsf@HIDDEN>
 <670D8E4A-333D-4E2D-97CC-86728965989D@HIDDEN>
 <83a613np4p.fsf@HIDDEN> <87fsavf688.fsf@HIDDEN>
 <831qmfnkto.fsf@HIDDEN> <87bkljf4oh.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 61730
Cc: mattias.engdegard@HIDDEN, 61730 <at> debbugs.gnu.org,
 monnier@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Michael Heerdegen <michael_heerdegen@HIDDEN>
> Cc: mattias.engdegard@HIDDEN,  61730 <at> debbugs.gnu.org,
>   monnier@HIDDEN
> Date: Fri, 24 Feb 2023 16:45:18 +0100
> 
> Eli Zaretskii <eliz@HIDDEN> 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.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#61730; Package emacs. Full text available.

Message received at 61730 <at> debbugs.gnu.org:


Received: (at 61730) by debbugs.gnu.org; 24 Feb 2023 15:45:33 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Feb 24 10:45:33 2023
Received: from localhost ([127.0.0.1]:37964 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pVaGK-0001dM-S0
	for submit <at> debbugs.gnu.org; Fri, 24 Feb 2023 10:45:33 -0500
Received: from mout.web.de ([212.227.17.11]:47535)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <michael_heerdegen@HIDDEN>) id 1pVaGI-0001d2-0p
 for 61730 <at> debbugs.gnu.org; Fri, 24 Feb 2023 10:45:31 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=s29768273;
 t=1677253520; i=michael_heerdegen@HIDDEN;
 bh=SEo29mcVnWsRZ+7WzYi6k0TN2j93xs541IZKbOPk5ro=;
 h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date;
 b=KFPMO60v2lr90aVShF3B9US8kQ58044oLzAuMpZf4VBESYCx8K9FaPwUHqLFV+Eyz
 BSlpjXg8m+iQBYeXhV4gQJWWwaY+x0U7HiMSIp1D3y7C7HClI3dBah6nPiuGUsmlHn
 Jp9fp2lxutUDmJdZmpr29hWjYBl5vxt3ZbaeZrDtp6/Z1PZBtwN/tuq6HXB6HLu3CR
 Ie6qTxS8Rpx1TbY94bxy3NSpSmjlMemZrS5pJeTc+usRWXvTdee2JucQ+rYt8PfdPY
 OT2BkD0q0lqvzCxMF9lTAUl5EvlYPCimt4TYtIT00bL2XQzRn/xGSKFXcGlPJgwY/j
 xKZASAvqsU/fw==
X-UI-Sender-Class: 814a7b36-bfc1-4dae-8640-3722d8ec6cd6
Received: from drachen.dragon ([84.59.210.57]) by smtp.web.de (mrweb105
 [213.165.67.124]) with ESMTPSA (Nemesis) id 1N1uAl-1oTshV2nTl-0127U1; Fri, 24
 Feb 2023 16:45:20 +0100
From: Michael Heerdegen <michael_heerdegen@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#61730: 30.0.50; Compiler warnings for delq and delete
In-Reply-To: <831qmfnkto.fsf@HIDDEN> (Eli Zaretskii's message of "Fri, 24 Feb
 2023 17:29:23 +0200")
References: <87ilfsisje.fsf@HIDDEN>
 <670D8E4A-333D-4E2D-97CC-86728965989D@HIDDEN>
 <83a613np4p.fsf@HIDDEN> <87fsavf688.fsf@HIDDEN>
 <831qmfnkto.fsf@HIDDEN>
Date: Fri, 24 Feb 2023 16:45:18 +0100
Message-ID: <87bkljf4oh.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-Provags-ID: V03:K1:vHvXJCpkyeiKJf44MuUdqBngsYJGQHtYLopc55406J3kHlER4MU
 eH5n0heUzBKBUv5OF5uWvDtAZfddhah8LzPKRRm6FYmNuSiqcktKQhwCF5yV+GmOG05iho8
 xM75X1phZa7T8Gp1nD+f7ikBx0UnS/LqGytpjVDUz0pzB+FCTfiSaNw5wCjTVyumWnsD1f6
 LzLATgN3js6DVo2SZJAJQ==
X-Spam-Flag: NO
UI-OutboundReport: notjunk:1;M01:P0:5TIp0b9cdic=;mbE6HPAKuPk0SdVHw2MGI75U2Kd
 A/teyFmTf8JrhbwkZBRQUL/8npXsRZHdBhf6QGSbhHTGiDK1dZHkcGmnTC6Qwefh+1sMEZPBQ
 ON6HR1Zf+dyFfvrQChzkGmQ63HvJcL2Wq0MRZr/tK3kot2lJQDyGt+7hNQ+KyXJkeARo+nvsg
 HXAuH9ZjSonX2H7x7KR0UsVvuMYanyGuWJjJZaNY5Yam9WxR7zk7XSw2jqisHdfC2+qXzi1in
 e602U5RlICULF21wWChET164KwOoYDCpSTDxUyCiuTPb6ehGL6bO60ZJY6Tg5eU40lSNGxqOG
 gZzCUHldkEdIfqkcBsswEaQEuHHifiVFCtl21bnpzCIGS6GBCEL2LGK5A/8oduvdRkYKNazxg
 rkTGOjL8p0P3GJ3vnACv/uBxnUxnDun08X1w3vSuTvWZTWJmgqx00z71GJSyrEf0DrVWBsKZH
 hze927FhWfmL9qead+tQunSZ2s5jcTeee8Il2dpb/wroCZOyaBfgwQ5mhJZ0QLwfKpQwQqRUQ
 tY31Tn+92g2i7FUEB2fQTE9VX1jcVq1nP5LqUy1QIVVahKoB8zSWHWJA5i/2i8oAlUmwT7yVQ
 Az0BAHllswhjSuF5RrP4JndAJhzjp3jt4FC2PgO5ZNGNghG3QOpqF59yuTdTjZZAqRkSjLgaW
 1i024rBY1inObTU0WorJp+fMtkNHkcr1gA5a8DZdph1hMRqdNUiGHztydTQIG9/JoQD8ejA50
 N63ClCMxBl7b/9UPej2NkDVWR9hd7O8cu5xFgLguKLwQPOO9Visn5kmW3ZL9dZM0SZhaxtSAt
 mCNzFPpeBIHHYsgNJayiVrmcWDxaJXz1GX+D8XeuBDKmg15DTS9gHq7kUP0d9p2dvaXQpxwSV
 wPb4c3M354Zj+gmMwo0XHOjwwwYcRrxhBb6pxuV4CoifWOLZgOiO+KOi8bliTBhw+A1axQizD
 7fZNAmfuGa1ZUvnkP9xjP5XAGn8=
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 61730
Cc: mattias.engdegard@HIDDEN, 61730 <at> debbugs.gnu.org,
 monnier@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Eli Zaretskii <eliz@HIDDEN> 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.


> 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.


Michael.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#61730; Package emacs. Full text available.

Message received at 61730 <at> debbugs.gnu.org:


Received: (at 61730) by debbugs.gnu.org; 24 Feb 2023 15:29:31 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Feb 24 10:29:31 2023
Received: from localhost ([127.0.0.1]:37943 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pVa0p-00019P-3w
	for submit <at> debbugs.gnu.org; Fri, 24 Feb 2023 10:29:31 -0500
Received: from eggs.gnu.org ([209.51.188.92]:51310)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1pVa0n-00019C-LL
 for 61730 <at> debbugs.gnu.org; Fri, 24 Feb 2023 10:29:30 -0500
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 <eliz@HIDDEN>)
 id 1pVa0h-00022m-Aj; Fri, 24 Feb 2023 10:29:23 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From:
 Date; bh=bXfvaR2C1HsQqfNcGYnnn9DfKKLkw0PPbUMsgrRM+HY=; b=amPIVir+2YxU93/D1zMJ
 u2xq2ib6tmjnlqyAiqjvVCRBzFxYE3qx1HgqY1rrH+fyarK4HgQ8gRTeKfxReBwLoOfW0GF0lJXmX
 venm7UzhMR+W+IjZdiUZwLr7hzyUk3Ci6vfDBDY+7ha8ZkRIGO67pYkv0sSv9krO+OxAwAsEOFUBD
 W3KaWHenYJ0G2BriXyujNe75fmKa0qwSp0Om6CnAmBNJGqZBWsis7cAXZcucMwrh7EZ+d2N5ZWxsS
 ZQueLldLCHgY7tUPSnOe6Awu1wY7bqPvVvwRceQe1UkEh3iu4V79wMCueDp26z4b9Oru9AWGcXz8p
 F1+z5KjA3CNi/Q==;
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 <eliz@HIDDEN>)
 id 1pVa0g-0007yH-Pk; Fri, 24 Feb 2023 10:29:23 -0500
Date: Fri, 24 Feb 2023 17:29:23 +0200
Message-Id: <831qmfnkto.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Michael Heerdegen <michael_heerdegen@HIDDEN>
In-Reply-To: <87fsavf688.fsf@HIDDEN> (message from Michael Heerdegen on Fri,
 24 Feb 2023 16:11:51 +0100)
Subject: Re: bug#61730: 30.0.50; Compiler warnings for delq and delete
References: <87ilfsisje.fsf@HIDDEN>
 <670D8E4A-333D-4E2D-97CC-86728965989D@HIDDEN>
 <83a613np4p.fsf@HIDDEN> <87fsavf688.fsf@HIDDEN>
MIME-version: 1.0
Content-type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 61730
Cc: mattias.engdegard@HIDDEN, 61730 <at> debbugs.gnu.org,
 monnier@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Michael Heerdegen <michael_heerdegen@HIDDEN>
> Cc: Mattias Engdegård <mattias.engdegard@HIDDEN>,
>   61730 <at> debbugs.gnu.org,
>   monnier@HIDDEN
> Date: Fri, 24 Feb 2023 16:11:51 +0100
> 
> But yes, we would warn about some legitimate and safe calls.  The
> advantages outweigh the disadvantages in my opinion.

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?

> > 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.

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.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#61730; Package emacs. Full text available.

Message received at 61730 <at> debbugs.gnu.org:


Received: (at 61730) by debbugs.gnu.org; 24 Feb 2023 15:17:54 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Feb 24 10:17:54 2023
Received: from localhost ([127.0.0.1]:37923 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pVZpZ-0000og-RS
	for submit <at> debbugs.gnu.org; Fri, 24 Feb 2023 10:17:54 -0500
Received: from mout.web.de ([212.227.15.3]:52085)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <michael_heerdegen@HIDDEN>) id 1pVZpY-0000oU-M1
 for 61730 <at> 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@HIDDEN;
 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
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
From: Michael Heerdegen <michael_heerdegen@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#61730: 30.0.50; Compiler warnings for delq and delete
In-Reply-To: <83a613np4p.fsf@HIDDEN> (Eli Zaretskii's message of "Fri, 24 Feb
 2023 15:56:22 +0200")
References: <87ilfsisje.fsf@HIDDEN>
 <670D8E4A-333D-4E2D-97CC-86728965989D@HIDDEN>
 <83a613np4p.fsf@HIDDEN>
Date: Fri, 24 Feb 2023 16:11:51 +0100
Message-ID: <87fsavf688.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-Provags-ID: V03:K1:yx0E77sDabtXIkkf4OhtlwFa3tiMjZRowBfL2QbFkSBVmEeIgzg
 iUftbPrp8ssgSv5dzI/a2FVtvwDFI2/7/BhGTXihPsYzvhKcPkfLNB4QVdjD3jmddKg4w9K
 SGfVHtkdEH66B0dJ8j2/xoHS49UtSsBSOk4sta0NtwrXEEpOmpC+oGLnjR6p/5u/2X+4tHe
 h6hfFw1P+tvMAYfT/qiKA==
X-Spam-Flag: NO
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++zx
 L5bL5/H39ZGdsPdnWntYYsWWQt+ekVwVUBXCebiJVT5G43aJxUdo75+13rzaRGtRdV6A25miF
 Bvrd0NAS/AazhVWufHgcfmfInNC4vwI/bdZYcV026bHlMEhyW/QIkn1ytdg/lwKczP0BhY73G
 MDypyQ==
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 61730
Cc: Mattias =?utf-8?Q?Engdeg=C3=A5rd?= <mattias.engdegard@HIDDEN>,
 61730 <at> debbugs.gnu.org, monnier@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Eli Zaretskii <eliz@HIDDEN> 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.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#61730; Package emacs. Full text available.

Message received at 61730 <at> debbugs.gnu.org:


Received: (at 61730) by debbugs.gnu.org; 24 Feb 2023 13:56:32 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Feb 24 08:56:32 2023
Received: from localhost ([127.0.0.1]:36354 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pVYYq-0006hf-1v
	for submit <at> debbugs.gnu.org; Fri, 24 Feb 2023 08:56:32 -0500
Received: from eggs.gnu.org ([209.51.188.92]:40628)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1pVYYo-0006hS-Cl
 for 61730 <at> debbugs.gnu.org; Fri, 24 Feb 2023 08:56:30 -0500
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 <eliz@HIDDEN>)
 id 1pVYYi-0002go-20; Fri, 24 Feb 2023 08:56:24 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From:
 Date; bh=ihYyILU5yFXggjTVpZbMQ9i5blIwRsKbJUQ+Jz/3Ptc=; b=EJTyLw9XjBIyN+NoSd89
 WHUB9VwWQs/6FzQusKfw5CvIzj1P4HRD2r5BV6FDhd/UbD3WrmOWVfu+uEMJ/uldVICGUXUjFFIel
 L8DqEcgNA1NM33g4MUP1kJck7Et2M/890lpvrK2iTmikC/byk+PYZe9mPXJlplVlakLaxennqcb97
 OPbgLf8SEUhctHFLiliBbrUjwK8p16T+I9laakaSTqmiResAiy3V8wTravQV6bEzZkv5YLVOeWPRK
 1t+wV2ry+7a/82O29zVIGdaZ4Lo1AhzbEtx0MMVQBfpd2Ank7n0dilFXYaI+ANBVWWZbt0604Zl6U
 lPKJviCMUcG5VQ==;
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 <eliz@HIDDEN>)
 id 1pVYYg-0004R4-NJ; Fri, 24 Feb 2023 08:56:23 -0500
Date: Fri, 24 Feb 2023 15:56:22 +0200
Message-Id: <83a613np4p.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Mattias =?utf-8?Q?Engdeg=C3=A5rd?= <mattias.engdegard@HIDDEN>
In-Reply-To: <670D8E4A-333D-4E2D-97CC-86728965989D@HIDDEN> (message from
 Mattias =?utf-8?Q?Engdeg=C3=A5rd?= on Fri, 24 Feb 2023 14:43:34 +0100)
Subject: Re: bug#61730: 30.0.50; Compiler warnings for delq and delete
References: <87ilfsisje.fsf@HIDDEN>
 <670D8E4A-333D-4E2D-97CC-86728965989D@HIDDEN>
MIME-version: 1.0
Content-type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 61730
Cc: michael_heerdegen@HIDDEN, 61730 <at> debbugs.gnu.org, monnier@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Cc: 61730 <at> debbugs.gnu.org, Stefan Monnier <monnier@HIDDEN>
> From: Mattias Engdegård <mattias.engdegard@HIDDEN>
> Date: Fri, 24 Feb 2023 14:43:34 +0100
> 
> Let's experiment: warning about for-effect calls to
> 
>   mapcar mapcan mapconcat
>   delq delete delete-dups delete-consecutive-dups
>   cl-delete cl-delete-if cl-delete-if-not cl-delete-duplicates
>   sort
> 
> results in 34 such calls found on master, most of them about `delq` and `delete`, but `delete-dups`, `cl-delete`, `mapconcat` and `sort` are also represented.
> 
> Some of these are no doubt safe, a few of them knowingly so, but it's definitely not obvious from a quick look at the code. It's poor style in any case.
> 
> 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; please try not
to emit the warning in those cases.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#61730; Package emacs. Full text available.

Message received at 61730 <at> debbugs.gnu.org:


Received: (at 61730) by debbugs.gnu.org; 24 Feb 2023 13:43:44 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Feb 24 08:43:44 2023
Received: from localhost ([127.0.0.1]:36319 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pVYMS-0006II-6A
	for submit <at> debbugs.gnu.org; Fri, 24 Feb 2023 08:43:44 -0500
Received: from mail-lj1-f181.google.com ([209.85.208.181]:42574)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <mattias.engdegard@HIDDEN>) id 1pVYMP-0006I2-Va
 for 61730 <at> debbugs.gnu.org; Fri, 24 Feb 2023 08:43:43 -0500
Received: by mail-lj1-f181.google.com with SMTP id e9so14168547ljn.9
 for <61730 <at> debbugs.gnu.org>; Fri, 24 Feb 2023 05:43:41 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=to:cc:date:message-id:subject:mime-version
 :content-transfer-encoding:from:sender:from:to:cc:subject:date
 :message-id:reply-to;
 bh=AVJhFIepaD10As4d+SSTHaDWEhTzVshaBTmIwPwRZoY=;
 b=P0yeEIaViOseU8CKHnSWgiORtZCgc2ma5LdUDHXTJbOg7yEuWCBKBVxkUVbLbNFcNZ
 /3giDLJxv1BdIOWH4PzaCtDtfIIsGOIwJJbOKsXJKL+qJovAweY4VWJqtAp2pIzcHAqZ
 hUqM76xEGn4NZYjz54sbTJGYBxkp7MC7TDG25BwBdnHw+AXDxBzryoQPEbQOQNuOE8ED
 JpBSCbvKAwszDjL2BJlKeg343HQQOqtwGEXbU52jv6jnQqDaJh1Q4LraZy+jcKUOl6Bn
 rhVdkE6fVAmbw/C8ZPd/uIeqOOUo94pLj9yyp0xo+Ng1TFrotmfoDdYCK+KsywAcTED8
 41tg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=to:cc:date:message-id:subject:mime-version
 :content-transfer-encoding:from:sender:x-gm-message-state:from:to:cc
 :subject:date:message-id:reply-to;
 bh=AVJhFIepaD10As4d+SSTHaDWEhTzVshaBTmIwPwRZoY=;
 b=oUStKWkItPQG0DJ0ybwmJqO2hGdI/mZPLqj4nJW+/+01H6+42m1xowutHbFmUYy2Mg
 DBK9mU5l3DwzUgfja6PqNR4JDOWps3vlk9wWtu5xS9nVLrbPlwRIUqJ08lRMNunHnAey
 Ml53nUYVjs5n6ay/VuT12bt/Fou1PmEd0z0Io6R15Od381LL6128HyICpcE4RLmMqJ6g
 xtPkqUQ4wJ609BKxU9htlKMizK1njvhSkIFj6H+s7ufK2R/+SzAz4Clcytq8n2H37lc+
 gN7bhxA+cIF/ezIDHZlC6FclJuqUha+BPj3SfSqoKFTuCRFUVENsc8zNKdYjX7v30oqO
 XGFg==
X-Gm-Message-State: AO0yUKVoOZKfUG4PYpMFf2F5HnfEGb3OG966D6Z6nFoNMMxlTk5AAyL3
 jWiaW+cxHKmdRqGZGo95wb8=
X-Google-Smtp-Source: AK7set92kpy6/DF96MBZ/o8ZaVqNCEje3ygaurlxAR+A3dhSxAiFzlXFsL4x+i+etw3Wf0XYEALZlA==
X-Received: by 2002:a2e:a227:0:b0:293:40ce:b08e with SMTP id
 i7-20020a2ea227000000b0029340ceb08emr6624134ljm.16.1677246215768; 
 Fri, 24 Feb 2023 05:43:35 -0800 (PST)
Received: from smtpclient.apple (c188-150-171-209.bredband.tele2.se.
 [188.150.171.209]) by smtp.gmail.com with ESMTPSA id
 s25-20020a2e2c19000000b002935006e487sm1019966ljs.122.2023.02.24.05.43.34
 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128);
 Fri, 24 Feb 2023 05:43:35 -0800 (PST)
From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= <mattias.engdegard@HIDDEN>
Content-Type: text/plain;
	charset=us-ascii
Content-Transfer-Encoding: quoted-printable
Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.14\))
Subject: bug#61730: 30.0.50; Compiler warnings for delq and delete
Message-Id: <670D8E4A-333D-4E2D-97CC-86728965989D@HIDDEN>
Date: Fri, 24 Feb 2023 14:43:34 +0100
To: Michael Heerdegen <michael_heerdegen@HIDDEN>
X-Mailer: Apple Mail (2.3654.120.0.1.14)
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 61730
Cc: 61730 <at> debbugs.gnu.org, Stefan Monnier <monnier@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

> I think we should add compiler warnings

You rang?

> for `delete' and `delq' function
> calls whose return values are unused.

Let's experiment: warning about for-effect calls to

  mapcar mapcan mapconcat
  delq delete delete-dups delete-consecutive-dups
  cl-delete cl-delete-if cl-delete-if-not cl-delete-duplicates
  sort

results in 34 such calls found on master, most of them about `delq` and =
`delete`, but `delete-dups`, `cl-delete`, `mapconcat` and `sort` are =
also represented.

Some of these are no doubt safe, a few of them knowingly so, but it's =
definitely not obvious from a quick look at the code. It's poor style in =
any case.

Thus such a warning definitely falls on the beneficial side. Let's do =
it.

> I think the warnings could be added in a similar way as the "mapcar
> called for effect" warnings work.

That's probably the best place to start (although we prefer warnings to =
be emitted by the front-end and not in codegen).

We may want to change the warning text from "called for effect" because =
it's written from the perspective of the compiler; the programmer thinks =
of it as 'not using the return value'.

For that matter, `with-suppressed-warnings` doesn't work for suppressing =
this warning very well; we may want to do something about that. This is =
true for the existing `mapcar` warning as well.

> Adding the same kind of warning for `remq' and `remove' would probably
> also be useful.  This will probably not occur that often but it still
> would be useful I think.

The compiler should already warn about those two since they are declared =
side-effect-free. Unless somehow `byte-compile-delete-errors` is set =
during compilation, which can happen if the code messes about with =
(optimise (safety ...)) -- it's a bit unfortunate. Please tell us if you =
observe anomalies in this regard.





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#61730; Package emacs. Full text available.

Message received at 61730 <at> debbugs.gnu.org:


Received: (at 61730) by debbugs.gnu.org; 24 Feb 2023 03:59:24 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Feb 23 22:59:24 2023
Received: from localhost ([127.0.0.1]:35756 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pVPEy-0005wP-C7
	for submit <at> debbugs.gnu.org; Thu, 23 Feb 2023 22:59:24 -0500
Received: from eggs.gnu.org ([209.51.188.92]:46220)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rms@HIDDEN>) id 1pVPEv-0005w9-Nu
 for 61730 <at> debbugs.gnu.org; Thu, 23 Feb 2023 22:59:22 -0500
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 <rms@HIDDEN>)
 id 1pVPEp-0008Vd-H6; Thu, 23 Feb 2023 22:59:15 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=Date:References:Subject:In-Reply-To:To:From:
 mime-version; bh=OfGCQj9amLsJwnzZeNstDCLxZkCnE3CGeH0TnRQxQWc=; b=pFPKBNp77X+L
 vaDgFsaU0IjX+XJ5W7EKycBW7a0nxspZpPuCaruah15EldbJ603jB+HZjrBWxMSdcgn2NWyE1ieC9
 ZLgEIZSii52Y/JILnQC30r94d7b7Kp/qhdf47ZPBX45T5dfTK9qNSBZCbYMsIMNpdeLdOgiYcR1Qt
 Iq3Fv8VOkHaS77KSGnrjPWnYvmBEi1/r0pyJVGDCUheSIweQAsEk4he5bMn+V7Jjy4fGtPogndA83
 Z+bda71/69L2HxUCTbkvDaStm/S8hqKFXYRVSaeKsUNPBUdH/HlF3BrpNYmIYSBmRErkezlnrW7+k
 z6ygFB2oLZvN5M0k0f54fw==;
Received: from rms by fencepost.gnu.org with local (Exim 4.90_1)
 (envelope-from <rms@HIDDEN>)
 id 1pVPEo-0000FK-Oa; Thu, 23 Feb 2023 22:59:14 -0500
Content-Type: text/plain; charset=Utf-8
From: Richard Stallman <rms@HIDDEN>
To: Michael Heerdegen <michael_heerdegen@HIDDEN>
In-Reply-To: <87ilfsisje.fsf@HIDDEN> (message from Michael Heerdegen on Thu,
 23 Feb 2023 11:29:25 +0100)
Subject: Re: bug#61730: 30.0.50; Compiler warnings for delq and delete
References: <87ilfsisje.fsf@HIDDEN>
Message-Id: <E1pVPEo-0000FK-Oa@HIDDEN>
Date: Thu, 23 Feb 2023 22:59:14 -0500
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 61730
Cc: 61730 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Reply-To: rms@HIDDEN
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

  > I think we should add compiler warnings for `delete' and `delq' function
  > calls whose return values are unused.

I think that is a good idea.  But before we release such a change, we
should try compiling a lot of code with it and study the warnings produced.
Are nearly all the warnings caused by real bugs?

There are some special cases where the unused value is not a bug.  For
instance, when you know that the elements to be deleted cannot include
the first element, it is safe not to store the result back.  One can
argue that it is cleaner to do so anyway, but that's a matter of
neatness, not a bug.

-- 
Dr Richard Stallman (https://stallman.org)
Chief GNUisance of the GNU Project (https://gnu.org)
Founder, Free Software Foundation (https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)






Information forwarded to bug-gnu-emacs@HIDDEN:
bug#61730; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 23 Feb 2023 10:29:35 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Feb 23 05:29:35 2023
Received: from localhost ([127.0.0.1]:33082 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pV8r1-00065g-FN
	for submit <at> debbugs.gnu.org; Thu, 23 Feb 2023 05:29:35 -0500
Received: from lists.gnu.org ([209.51.188.17]:53138)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <michael_heerdegen@HIDDEN>) id 1pV8qy-00065Y-UB
 for submit <at> debbugs.gnu.org; Thu, 23 Feb 2023 05:29:34 -0500
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 <michael_heerdegen@HIDDEN>)
 id 1pV8qy-00069a-Ku
 for bug-gnu-emacs@HIDDEN; Thu, 23 Feb 2023 05:29:32 -0500
Received: from mout.web.de ([212.227.15.3])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <michael_heerdegen@HIDDEN>)
 id 1pV8qw-0004GW-Vw
 for bug-gnu-emacs@HIDDEN; Thu, 23 Feb 2023 05:29:32 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=s29768273;
 t=1677148168; i=michael_heerdegen@HIDDEN;
 bh=Gm0W8PWHyYguGkg5ccsotBDDE/XZRvj8PGOmrawbnmA=;
 h=X-UI-Sender-Class:From:To:Subject:Date;
 b=D7yY+SYLjC9E34HuRm96poAOeqgC6Ldv/RecJM8E9gzuvJlZ7W7+vFkQr8LN40cVR
 k36EEik5u7EIh7a/JUVd/uADQjrDx+2iptrvf9iI38S8uyeI601/MzZ9qRHEucdBfu
 JIAtiS97ymAryacq9XmGXJeFXlT2fngkAadOWspxPAKLkKe9/+dfkYdBkG9hgC4w/p
 U0Zk9SxPO0NqVsldd/VZYv16dNN0++ygOOhSZLwvsUjBg/ffwzMSXTcJZA189MtqKp
 1NlaWQDR06/8w8r0kww03By2aY+mM9okm7LXYBbnLAWZhanMsbPSpgdWdPPodRAFLC
 9P0LnKW546ylA==
X-UI-Sender-Class: 814a7b36-bfc1-4dae-8640-3722d8ec6cd6
Received: from drachen.dragon ([84.59.210.57]) by smtp.web.de (mrweb005
 [213.165.67.108]) with ESMTPSA (Nemesis) id 1Mc1ZT-1owNCK3OYB-00daQB for
 <bug-gnu-emacs@HIDDEN>; Thu, 23 Feb 2023 11:29:27 +0100
From: Michael Heerdegen <michael_heerdegen@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: 30.0.50; Compiler warnings for delq and delete
Date: Thu, 23 Feb 2023 11:29:25 +0100
Message-ID: <87ilfsisje.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Provags-ID: V03:K1:18dyQULZ2Y5sLk2Rx0jrIMy5UqY8u5CSpX5idCcI6oNq7TY3Ohd
 9wR+0zhThu/xRbOt3bXli52DA0C17KFSNX+bBMDvmgycfr9aJtp3IvitqkKMtxC75AAt4Vh
 /TqL+kfboFxbzSUUaarrQexswDpno5TeIWbULWZ0KNYtwbgESYzGa+BixMR031WO6xRjN4V
 iKryzm16x1//KchdNG5iQ==
X-Spam-Flag: NO
UI-OutboundReport: notjunk:1;M01:P0:QozTabbUJtM=;fJe5golr36m9lDQR1cfY06QOOHT
 nUHObFe2Fh6DP1R45fgT17p1uKbffJT5USkXbC7KpCq47wQWKh4Ksa6nSvnPDxr9kqZFNyYSO
 h619pO+egdRbI0/leueAgRukk+yS+4p8ZHm0zWkpPAtNjx8S83MnADlb7jHSxs3JlnWz9X4Dj
 V5AY19WmqQnbpswQaZ0bIp08lx6chtPPHT52c2Q1xkfmVW47vF/Y0zRs9YQneF23K5B4fOkRb
 77IqNmvCyzz4D4CzjDIy+psZA1T05zUu4XAYzpZu8rG/fjGVSwS1j65GSgiDyhmhIRnJbQEb3
 WOW1pSd1i3Q7HHOI6e7xZaGVpq5rN3UbIowYOBXSBvMpcP27FXTXNSfg0xxz4veE0CjcOl6Ss
 d5Yp8/nKIXvDdIP23bynZISc2I8o37gBFjm9xzlq8+b6WaNb8mGJrVOw5G58mYcbPDfMQwsFS
 C7pRBia3lK0HhKIhOXCCVEYwagxMTZWW4T8ePLycNkL+rROr9V5S6rLIbgOQrkzhYFyQLnV+v
 J9RbGlwrYntvYMoDOy7uLbh+lyHMNVGMXMFLl0FCrD5EoLdYvNj8vunfAAOnO73CJ+FBkxvB5
 nHMFm6uMqH4t7gAk3ZiuINg1BBuFR+a81IHlT9Fvj7onaqmXYePS3T9BOFvvrOLBxNIHGf189
 e49S0Yi6QYvCmkPqXc+kh6Kv0sjGAO2jFsyj7g4aUMFFkqBrgDRSuHdAVxZakyk3m+UZtlFmI
 xpKIP684ldo7iZowbwv546xEdqnM+t8yTkAKvIDod/ST8ZZBXpnZdLmJYd2PuhX7D9RysiXl1
 f6IVqDRpLxfyBrCcuqHembKk//tDjXohg+F5ldwXX7tFRTPk1bB1i8y3qTXNWKQZ2zAta4oB6
 ujcY+CkUUmkWPzlVpRk2Xrd9Bsn0etrc391A/nFNITDBh46TFqWyI8SJTmrpq8OzYytUSL9oT
 txM0CabsK6Z8KGL3EOFHKou7pJ4=
Received-SPF: pass client-ip=212.227.15.3;
 envelope-from=michael_heerdegen@HIDDEN; helo=mout.web.de
X-Spam_score_int: -27
X-Spam_score: -2.8
X-Spam_bar: --
X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001,
 RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001,
 SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.4 (-)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.4 (--)


Hello,

I think we should add compiler warnings for `delete' and `delq' function
calls whose return values are unused.  Those are most likely unintended:
still some programmers don't know that the return value must be assigned
back because the destructive operation on the original list structure
does not necessarily lead to the return value.  It's a pitfall and can
lead to bugs that are hard to debug, so having warnings would be an
improvement.

I think the warnings could be added in a similar way as the "mapcar
called for effect" warnings work.

Adding the same kind of warning for `remq' and `remove' would probably
also be useful.  This will probably not occur that often but it still
would be useful I think.

TIA,

Michael.






Acknowledgement sent to Michael Heerdegen <michael_heerdegen@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#61730; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Mon, 4 Sep 2023 09:00:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.