From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#67568: Emacs master: Bug in byte compiler when there's an unused parameter. Date: Fri, 01 Dec 2023 10:40:55 -0500 Message-ID: References: <1c2d9219-093c-0726-13ce-2c952f6e33ba@gutov.dev> Reply-To: Stefan Monnier Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21687"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Dmitry Gutov , 67568@debbugs.gnu.org To: Alan Mackenzie Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Dec 01 16:42:05 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1r95eW-0005OE-Bc for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 01 Dec 2023 16:42:04 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r95eN-0001bO-57; Fri, 01 Dec 2023 10:41:55 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r95eL-0001ay-64 for bug-gnu-emacs@gnu.org; Fri, 01 Dec 2023 10:41:53 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r95eK-0008Jf-RA for bug-gnu-emacs@gnu.org; Fri, 01 Dec 2023 10:41:52 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1r95eT-00070W-IH for bug-gnu-emacs@gnu.org; Fri, 01 Dec 2023 10:42:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 01 Dec 2023 15:42:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 67568 X-GNU-PR-Package: emacs Original-Received: via spool by 67568-submit@debbugs.gnu.org id=B67568.170144527626881 (code B ref 67568); Fri, 01 Dec 2023 15:42:01 +0000 Original-Received: (at 67568) by debbugs.gnu.org; 1 Dec 2023 15:41:16 +0000 Original-Received: from localhost ([127.0.0.1]:55993 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r95dk-0006zV-AP for submit@debbugs.gnu.org; Fri, 01 Dec 2023 10:41:16 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:23533) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r95dh-0006zD-0A for 67568@debbugs.gnu.org; Fri, 01 Dec 2023 10:41:15 -0500 Original-Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 46FB41000AD; Fri, 1 Dec 2023 10:40:58 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1701445257; bh=KQAq6hNVgJmk13yxtEhDeRe2pvB0BTRjsl76tkgFlzw=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=hnbMAfvmG4cBcC7toY6mRNGT4/g3FquvVphQviWrSXBbLCPzaiCJQWvZQW370p4ZZ x92ENB0gAP0bgoHo968Lb8XRXETddruv196oI0Iao/RwT/b+YV/F56UCBvbU6c4eOl rquxMxSJChZ6TZUduvNsUJ+DtjYXsErEF171yw90wOxDqmfExz0zkkHZFBkuFedJ80 a0/AByk1qw9gnzISX9V47pFJiKy9RXvWrGdii4yM+Bg0BoimZ8P5Gdg+1iMY+8aqQM UAJvvIuP+Vde9qIaRMTCAt8XL1+afglw+gPVL6mRn+d7CmF5g0wnOfKy61iPMuD63z f90Y99ZCpeMzA== Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 93648100043; Fri, 1 Dec 2023 10:40:57 -0500 (EST) Original-Received: from alfajor (rrcs-108-176-28-115.nyc.biz.rr.com [108.176.28.115]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 6FFB01201FA; Fri, 1 Dec 2023 10:40:57 -0500 (EST) In-Reply-To: (Alan Mackenzie's message of "Fri, 1 Dec 2023 15:22:24 +0000") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:275327 Archived-At: > I have a candidate for the buggy function, namely macroexp-parse-body. Duh! I think the patch below should fix it. Stefan diff --git a/lisp/emacs-lisp/macroexp.el b/lisp/emacs-lisp/macroexp.el index 6eb670d6dc1..6ed3e0c4896 100644 --- a/lisp/emacs-lisp/macroexp.el +++ b/lisp/emacs-lisp/macroexp.el @@ -540,7 +540,9 @@ macroexp-parse-body (while (and body (let ((e (car body))) - (or (stringp e) + (or (and (stringp e) + ;; Only the first string can be a docstring. + (not (delq nil (mapcar #'stringp decls)))) (memq (car-safe e) '(:documentation declare interactive cl-declare))))) (push (pop body) decls)))