From mboxrd@z Thu Jan 1 00:00:00 1970
Path: news.gmane.org!.POSTED!not-for-mail
From: Philipp Stephani
Newsgroups: gmane.emacs.bugs
Subject: bug#24912: 25.1.50;
Byte compiler generates incorrect code when second &optional is used
Date: Tue, 22 Nov 2016 13:10:35 +0000
Message-ID:
References:
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary=001a114706941b55b90541e380bf
X-Trace: blaine.gmane.org 1479820281 5032 195.159.176.226 (22 Nov 2016 13:11:21 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Tue, 22 Nov 2016 13:11:21 +0000 (UTC)
To: 24912-done@debbugs.gnu.org
Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Nov 22 14:11:17 2016
Return-path:
Envelope-to: geb-bug-gnu-emacs@m.gmane.org
Original-Received: from lists.gnu.org ([208.118.235.17])
by blaine.gmane.org with esmtp (Exim 4.84_2)
(envelope-from )
id 1c9Aqy-0000ww-PH
for geb-bug-gnu-emacs@m.gmane.org; Tue, 22 Nov 2016 14:11:17 +0100
Original-Received: from localhost ([::1]:55551 helo=lists.gnu.org)
by lists.gnu.org with esmtp (Exim 4.71)
(envelope-from )
id 1c9Ar0-0006ZL-Rk
for geb-bug-gnu-emacs@m.gmane.org; Tue, 22 Nov 2016 08:11:18 -0500
Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40354)
by lists.gnu.org with esmtp (Exim 4.71)
(envelope-from ) id 1c9Aqq-0006XR-0K
for bug-gnu-emacs@gnu.org; Tue, 22 Nov 2016 08:11:08 -0500
Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
(envelope-from ) id 1c9Aqk-0002eH-8g
for bug-gnu-emacs@gnu.org; Tue, 22 Nov 2016 08:11:07 -0500
Original-Received: from debbugs.gnu.org ([208.118.235.43]:50770)
by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)
(Exim 4.71) (envelope-from )
id 1c9Aqk-0002e8-4w
for bug-gnu-emacs@gnu.org; Tue, 22 Nov 2016 08:11:02 -0500
Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2)
(envelope-from ) id 1c9Aqj-0006Kt-TX
for bug-gnu-emacs@gnu.org; Tue, 22 Nov 2016 08:11:01 -0500
Resent-From: Philipp Stephani
Original-Sender: "Debbugs-submit"
Resent-To: bug-gnu-emacs@gnu.org
Resent-Date: Tue, 22 Nov 2016 13:11:01 +0000
Resent-Message-ID:
Resent-Sender: help-debbugs@gnu.org
X-GNU-PR-Message: cc-closed 24912
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords:
Mail-Followup-To: 24912@debbugs.gnu.org, p.stephani2@gmail.com,
p.stephani2@gmail.com
Original-Received: via spool by 24912-done@debbugs.gnu.org id=D24912.147982025324337
(code D ref 24912); Tue, 22 Nov 2016 13:11:01 +0000
Original-Received: (at 24912-done) by debbugs.gnu.org; 22 Nov 2016 13:10:53 +0000
Original-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
Original-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
Original-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)
In-Reply-To:
X-BeenThere: debbugs-submit@debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Received-From: 208.118.235.43
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.org@gnu.org
Original-Sender: "bug-gnu-emacs"
Xref: news.gmane.org gmane.emacs.bugs:125985
Archived-At:
--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
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--