From unknown Sat Jun 21 10:18:46 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#24912 <24912@debbugs.gnu.org> To: bug#24912 <24912@debbugs.gnu.org> Subject: Status: 25.1.50; Byte compiler generates incorrect code when second &optional is used Reply-To: bug#24912 <24912@debbugs.gnu.org> Date: Sat, 21 Jun 2025 17:18:46 +0000 retitle 24912 25.1.50; Byte compiler generates incorrect code when second &= optional is used reassign 24912 emacs submitter 24912 Philipp Stephani severity 24912 minor thanks From debbugs-submit-bounces@debbugs.gnu.org Wed Nov 09 16:09:10 2016 Received: (at submit) by debbugs.gnu.org; 9 Nov 2016 21:09:10 +0000 Received: from localhost ([127.0.0.1]:51315 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c4a7J-0004gY-Sj for submit@debbugs.gnu.org; Wed, 09 Nov 2016 16:09:10 -0500 Received: from eggs.gnu.org ([208.118.235.92]:34247) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c4a7I-0004gM-Qw for submit@debbugs.gnu.org; Wed, 09 Nov 2016 16:09:09 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c4a7C-0007tS-8j for submit@debbugs.gnu.org; Wed, 09 Nov 2016 16:09:03 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: * X-Spam-Status: No, score=1.1 required=5.0 tests=BAYES_50, FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:37925) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1c4a7C-0007tC-5I for submit@debbugs.gnu.org; Wed, 09 Nov 2016 16:09:02 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53430) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c4a7A-0006X4-OX for bug-gnu-emacs@gnu.org; Wed, 09 Nov 2016 16:09:01 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c4a79-0007rD-K9 for bug-gnu-emacs@gnu.org; Wed, 09 Nov 2016 16:09:00 -0500 Received: from mail-wm0-x236.google.com ([2a00:1450:400c:c09::236]:36653) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1c4a79-0007qw-Cs for bug-gnu-emacs@gnu.org; Wed, 09 Nov 2016 16:08:59 -0500 Received: by mail-wm0-x236.google.com with SMTP id g23so4497341wme.1 for ; Wed, 09 Nov 2016 13:08:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=1HPDH3T4X9yTgqPRkK8+BbGWwJjSSwoKY+JaZObf1Sw=; b=GG5Mdv8W5HZE67rp5XqB2PrEwUBHTYRCfcDBeAKR4U0c5jsKZaJARpFnuapvOoriBm bqh0P2ceCTkKtFV0CYdygnS7I+AHl9lGSYdutCQnXKC8tyNAcNJ1AgcmCf1DwwvDjs7R l45DnDjqoR6IQw1d9yt6GXS6+SLfqoHmtnOxPMM4TTOXowthngjHoDB3CHMGTU+KtbJJ bvX5eJT2RtK+/A+CVIiqQ1qS1m8Rj/0RmyHcJbgwXTP7sCceZ1SwLdHkrNTnHf+osKyZ ssdYq/UyHEZPthidSqy7xCWF+vjtQLpqUC0V3uV9N3CHBeQBx9khElJ9Qmsn04ca/AHY UlBA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=1HPDH3T4X9yTgqPRkK8+BbGWwJjSSwoKY+JaZObf1Sw=; b=U/6aIwJSvkz9rqiyeGiIG6GZ01erw9goV5zp2zXwwfX2Wh1gEBJls8SnEYqmwdK/Lq XUAsQrT7gKR/K4zt9EXbwsSZhUG2FjxurvDdakcI4Qpzy/Qf8anDOpNkVQZNW11fugyI uuC1+H5Zj3W4/mrWTv2OEsRrIVf7PgrYqoPQu/NHyM+VlcaWphYgd/tTosQbUWjfCucb j0k9v12y9XPE8QzmjOdjuVqNvyX1s82ZcEIqwgHDPqvCMWQjJqX8yuNMa8fyBm36SIU4 6881Nk8xCAX/+ymOqylezAFP4YoLfXZc89J2bKBNJIeujEN/iM1BawYeggZRGraCl5SK DJxw== X-Gm-Message-State: ABUngvcMctFthCsYb8OQKQp7pLqYRNQBP5N2pD6JcyBLfPHqq8hn8GuQHUe8khcpcp1ogQ== X-Received: by 10.194.113.234 with SMTP id jb10mr1362056wjb.19.1478725737892; Wed, 09 Nov 2016 13:08:57 -0800 (PST) Received: from a.muc.corp.google.com ([2a00:79e0:15:4:d141:a38c:6374:fc8b]) by smtp.gmail.com with ESMTPSA id k2sm1678381wjv.11.2016.11.09.13.08.56 for (version=TLS1_2 cipher=AES128-SHA bits=128/128); Wed, 09 Nov 2016 13:08:57 -0800 (PST) From: Philipp Stephani To: bug-gnu-emacs@gnu.org Subject: 25.1.50; Byte compiler generates incorrect code when second &optional is used Date: Wed, 09 Nov 2016 22:08:53 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -3.8 (---) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.8 (---) emacs -Q In *scratch*, evaluate: (funcall (let ((lexical-binding t)) (byte-compile (lambda (&optional a b) (list a b)))) 'a 'b) Result is (a b), as expected. Now evaluate (funcall (let ((lexical-binding t)) (byte-compile (lambda (&optional a &optional b) (list a b)))) 'a 'b) Result is (b nil). Emacs should either generate correct code in both cases, or signal an error in the latter case. In GNU Emacs 25.1.50.13 (x86_64-unknown-linux-gnu, GTK+ Version 3.10.8) of 2016-11-09 built on localhost Repository revision: eb364fddec1431f459166cebb36f09f6b371dd71 Windowing system distributor 'The X.Org Foundation', version 11.0.11501000 System Description: Ubuntu 14.04 LTS Configured using: 'configure --with-modules --enable-checking --enable-check-lisp-object-type 'CFLAGS=3D-ggdb3 -O0'' Configured features: XPM JPEG TIFF GIF PNG SOUND GSETTINGS NOTIFY GNUTLS FREETYPE XFT ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 MODULES Important settings: value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix Major mode: Lisp Interaction Minor modes in effect: tooltip-mode: t global-eldoc-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Recent messages: For information about GNU Emacs and the GNU system, type C-h C-a. Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug message dired format-spec rfc822 mml mml-sec password-cache epg epg-config gnus-util mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util help-fns help-mode easymenu cl-loaddefs pcase cl-lib mail-prsvr mail-utils time-date mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment elisp-mode lisp-mode prog-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese charscript case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer cl-preloaded nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote inotify dynamic-setting system-font-setting font-render-setting move-toolbar gtk x-toolkit x multi-tty make-network-process emacs) Memory information: ((conses 16 88985 12134) (symbols 48 19888 0) (miscs 40 343 148) (strings 32 14767 5042) (string-bytes 1 440399) (vectors 16 12780) (vector-slots 8 446092 5001) (floats 8 166 21) (intervals 56 209 0) (buffers 976 24) (heap 1024 40188 973)) --=20 Google Germany GmbH Erika-Mann-Stra=C3=9Fe 33 80636 M=C3=BCnchen Registergericht und -nummer: Hamburg, HRB 86891 Sitz der Gesellschaft: Hamburg Gesch=C3=A4ftsf=C3=BChrer: Matthew Scott Sucherman, Paul Terence Manicle Diese E-Mail ist vertraulich. Wenn Sie nicht der richtige Adressat sind, leiten Sie diese bitte nicht weiter, informieren Sie den Absender und l=C3= =B6schen Sie die E-Mail und alle Anh=C3=A4nge. Vielen Dank. This e-mail is confidential. If you are not the right addressee please do = not forward it, please inform the sender, and please erase this e-mail including any attachments. Thanks. From debbugs-submit-bounces@debbugs.gnu.org Tue Nov 22 08:10:53 2016 Received: (at 24912-done) by debbugs.gnu.org; 22 Nov 2016 13:10:53 +0000 Received: from localhost ([127.0.0.1]:37936 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c9Aqb-0006KT-HN for submit@debbugs.gnu.org; Tue, 22 Nov 2016 08:10:53 -0500 Received: from mail-wm0-f51.google.com ([74.125.82.51]:35330) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c9Aqa-0006KG-3A for 24912-done@debbugs.gnu.org; Tue, 22 Nov 2016 08:10:52 -0500 Received: by mail-wm0-f51.google.com with SMTP id a197so24472930wmd.0 for <24912-done@debbugs.gnu.org>; Tue, 22 Nov 2016 05:10:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=8SpZKz3ZDqZQkRLyLsqduDmEDkupIjJZE203tphNiaE=; b=oUGlIGRb6T4W9k27ujftpMBSXoWCt9HNF5omIdgcjC3tXxvsWgZcOYYOmmLQpzr9JU cmsXFUPp5DrqR5Xo/xArfJitIFh35VNezMfyHtcBjlMxDtb6hhrUXh+LjQZhnDFKjM7n 3WJ+zFdrJ3VDJEPJmt4aqcBDp6HhyH8hgljMyWD8padJeKhtUtO7dSAQhymktszZCoI7 x3Lv3OQIOiIm5S8myXuTAII96+X0eJ159DX8fLhIeEmwviySGazBgCsGaS0Gqxwl056o S8glaerIT8fsbuWQlQyCmsnPFWiJqCd7/lF9+8H3WX8vyqW2HmxL5CjAs9h3jx5uTbLg YLqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=8SpZKz3ZDqZQkRLyLsqduDmEDkupIjJZE203tphNiaE=; b=O/V/sU5vYbaeLWy1fDN+2oRXdXdaiV7wyRqzMSRhuMG2TTyYsGLxzC5QhF2HUFG3XU jGXzIXjsgwnIGNhQkekA9j3eGGCjTM8CETd57ZCFCLCIxYZGadAIZhycWOdTjhlpJFo/ DlpGSNp0ygbc5J82rIjXvGhiHJ7zIJpXKotdXGEJC2z8FTo7wgrNZxyksSeO9wgiD5pZ HbJbsAtJqQhzxgRajyI4/CKWuHZB9Uqgw6Ai0luTOYEOD+0oJcSCqMN4+oD7SAiKW31V EM/FfN0ENToyTITO/bkwrdkxu9B7NS0HSH7tFW+7C7jF1n02OLbZwOyWk/cJvSHBZOoS rdPQ== X-Gm-Message-State: AKaTC01+CgzNT57ZrAA3s0d6aCn5jNsdXhZ0r5e0MSW5PXPHPJnJLXf/8RJRnSYll0mFbXZrRYt25Pl3rG9s/g== X-Received: by 10.28.216.65 with SMTP id p62mr2204380wmg.92.1479820246207; Tue, 22 Nov 2016 05:10:46 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Philipp Stephani Date: Tue, 22 Nov 2016 13:10:35 +0000 Message-ID: Subject: Re: bug#24912: 25.1.50; Byte compiler generates incorrect code when second &optional is used To: 24912-done@debbugs.gnu.org Content-Type: multipart/alternative; boundary=001a114706941b55b90541e380bf X-Spam-Score: 0.7 (/) X-Debbugs-Envelope-To: 24912-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.7 (/) --001a114706941b55b90541e380bf Content-Type: text/plain; charset=UTF-8 Philipp Stephani schrieb am Mi., 9. Nov. 2016 um 22:11 Uhr: > > emacs -Q > > In *scratch*, evaluate: > > (funcall > (let ((lexical-binding t)) > (byte-compile > (lambda (&optional a b) > (list a b)))) > 'a 'b) > > Result is (a b), as expected. Now evaluate > > (funcall > (let ((lexical-binding t)) > (byte-compile > (lambda (&optional a &optional b) > (list a b)))) > 'a 'b) > > Result is (b nil). > > Emacs should either generate correct code in both cases, or signal an > error in the latter case. > > Fixed with commit 0d913da15c094bf596dd685acecf3438228c15cf. --001a114706941b55b90541e380bf Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable


Philip= p Stephani <p.stephani2@gmail.c= om> schrieb am Mi., 9. Nov. 2016 um 22:11=C2=A0Uhr:

emacs -Q

In *scratch*, evaluate:

(funcall
=C2=A0(let ((lexical-binding t))
=C2=A0 =C2=A0(byte-compile
=C2=A0 =C2=A0 (lambda (&optional a b)
=C2=A0 =C2=A0 =C2=A0 (list a b))))
=C2=A0'a 'b)

Result is (a b), as expected.=C2=A0 Now evaluate

(funcall
=C2=A0(let ((lexical-binding t))
=C2=A0 =C2=A0(byte-compile
=C2=A0 =C2=A0 (lambda (&optional a &optional b)
=C2=A0 =C2=A0 =C2=A0 (list a b))))
=C2=A0'a 'b)

Result is (b nil).

Emacs should either generate correct code in both cases, or signal an
error in the latter case.

Fixed with commit =C2=A00d913da15c094bf596dd685acecf34382= 28c15cf.
--001a114706941b55b90541e380bf-- From unknown Sat Jun 21 10:18:46 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Wed, 21 Dec 2016 12:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 20 06:25:44 2021 Received: (at control) by debbugs.gnu.org; 20 Sep 2021 10:25:44 +0000 Received: from localhost ([127.0.0.1]:41031 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mSGUW-0005Oj-4j for submit@debbugs.gnu.org; Mon, 20 Sep 2021 06:25:44 -0400 Received: from mail1450c50.megamailservers.eu ([91.136.14.50]:52926 helo=mail265c50.megamailservers.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mSGUT-0005OT-7e for control@debbugs.gnu.org; Mon, 20 Sep 2021 06:25:38 -0400 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1632133530; bh=XOx7qJDBMs4UeR4i1nnT2KhIt02aTMNNoOwUMN/OIec=; h=From:Subject:Date:To:From; b=BXdcBWv+NETbIj/GlBqbgsI/DtIQimYvuiR9+kT28A3IZhW96mbeBTJY6dyumD90O p3TsAosClmxxYo8dL9SS+IAJbZe75YLy4FKj3wq9wjctajHzjfwESKUH50D0mvQmi0 owhuGOKTDFMYfrqYklV/MOzfOuQz005jxFa0xhS8= Feedback-ID: mattiase@acm.or Received: from stanniol.lan (c-b952e353.032-75-73746f71.bbcust.telenor.se [83.227.82.185]) (authenticated bits=0) by mail265c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id 18KAPRfJ003378 for ; Mon, 20 Sep 2021 10:25:29 +0000 From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.21\)) Subject: unarchive Message-Id: <43128C5B-CF67-406C-81C9-565799E55BB8@acm.org> Date: Mon, 20 Sep 2021 12:25:27 +0200 To: control@debbugs.gnu.org X-Mailer: Apple Mail (2.3445.104.21) X-CTCH-RefID: str=0001.0A742F1D.61486199.006A, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Rules: X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.4 cv=adICITkt c=1 sm=1 tr=0 ts=6148619a a=von4qPfY+hyqc0zmWf0tYQ==:117 a=von4qPfY+hyqc0zmWf0tYQ==:17 a=kj9zAlcOel0A:10 a=M51BFTxLslgA:10 a=LRrOjoC6W_rhQbfKAy0A:9 a=CjuIK1q_8ugA:10 X-Origin-Country: SE X-Spam-Score: 1.4 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: unarchive 24912 stop Content analysis details: (1.4 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 0.4 KHOP_HELO_FCRDNS Relay HELO differs from its IP's reverse DNS X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) unarchive 24912 stop From unknown Sat Jun 21 10:18:46 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Mon, 18 Oct 2021 11:24:05 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator