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

Previous Next

Package: emacs;

Reported by: Michael Heerdegen <michael_heerdegen <at> web.de>

Date: Thu, 23 Feb 2023 10:30:01 UTC

Severity: wishlist

Found in version 30.0.50

Full log


Message #56 received at 61730 <at> debbugs.gnu.org (full text, mbox):

From: Mattias EngdegÄrd <mattias.engdegard <at> gmail.com>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: Michael Heerdegen <michael_heerdegen <at> web.de>, Eli Zaretskii <eliz <at> gnu.org>,
 61730 <at> debbugs.gnu.org
Subject: Re: bug#61730: 30.0.50; Compiler warnings for delq and delete
Date: Sat, 25 Feb 2023 10:40:58 +0100
24 feb. 2023 kl. 21.20 skrev Stefan Monnier <monnier <at> iro.umontreal.ca>:
> 
>> -    (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 :-(

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.





This bug report was last modified 1 year and 286 days ago.

Previous Next


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