GNU bug report logs - #67568
Emacs master: Bug in byte compiler when there's an unused parameter.

Previous Next

Package: emacs;

Reported by: Alan Mackenzie <acm <at> muc.de>

Date: Fri, 1 Dec 2023 12:51:01 UTC

Severity: normal

Done: Stefan Monnier <monnier <at> iro.umontreal.ca>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Alan Mackenzie <acm <at> muc.de>
Subject: bug#67568: closed (Re: bug#67568: Emacs master: Bug in byte
 compiler when there's an unused parameter.)
Date: Sun, 03 Dec 2023 19:26:02 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#67568: Emacs master: Bug in byte compiler when there's an unused parameter.

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 67568 <at> debbugs.gnu.org.

-- 
67568: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=67568
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: dmitry <at> gutov.dev, acm <at> muc.de, 67568-done <at> debbugs.gnu.org
Subject: Re: bug#67568: Emacs master: Bug in byte compiler when there's an
 unused parameter.
Date: Sun, 03 Dec 2023 14:24:44 -0500
>> I'm wondering whether it should go to `emacs-29` or to `master`.
>> I'm leaning toward `emacs-29` because it's rather embarrassing (and
>> perplexing for the user) and the patch is simple.
>> Eli?  Stefan?
> No objections from me.

It turns out the bug is not present in `emacs-29`, it was introduced on
master by:

    commit f616edb4ccce5b9d60e3ff42806bd2131989cd1e
    Author: Mattias EngdegÄrd <mattiase <at> acm.org>
    Date:   Mon Sep 25 14:40:11 2023 +0200

    macroexp-parse-body: correct parsing of empty body (bug#66136)
    
    * lisp/emacs-lisp/macroexp.el (macroexp-parse-body):
    Return an empty body even when there are declarations present.
    Previously, the last declaration was considered part of the body,
    which is only correct if the input consists of a single string.
    
    Reported by Jens Schmidt.

So I pushed a better fix, on master.


        Stefan


[Message part 3 (message/rfc822, inline)]
From: Alan Mackenzie <acm <at> muc.de>
To: bug-gnu-emacs <at> gnu.org
Subject: Emacs master: Bug in byte compiler when there's an unused parameter.
Date: Fri, 1 Dec 2023 12:49:52 +0000
Hello, Emacs.

On a recent Emacs master:

(i) emacs -Q
(ii) In *scratch* enter the following:

    (byte-compile (lambda (x) "doc" "foo"))

  .
(iii) Enter C-u C-x C-e to evaluate the form.  The result looks like:

    #[257 "\300\207" [nil] 2 "doc

    (fn X)"]

  .  This is incorrect.  The only form in the constants vector is nil.
  It should be "foo".

(iv) Note that this only happens with the unused parameter x.  Without
it, the form compiles correctly.

-- 
Alan Mackenzie (Nuremberg, Germany).



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

Previous Next


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