From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.bugs Subject: bug#13367: 24.1; Wrong switch/case indentation inside some c++11 lambdas Date: Mon, 30 Sep 2019 18:59:02 +0000 Message-ID: <20190930185902.GC4761@ACM> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="258267"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Mutt/1.10.1 (2018-07-13) Cc: Denis Zalevskiy , 13367-done@debbugs.gnu.org To: Stefan Kangas Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Sep 30 21:00:13 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iF0u5-00154h-Hl for geb-bug-gnu-emacs@m.gmane.org; Mon, 30 Sep 2019 21:00:13 +0200 Original-Received: from localhost ([::1]:56178 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iF0u4-0000Mj-D4 for geb-bug-gnu-emacs@m.gmane.org; Mon, 30 Sep 2019 15:00:12 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:35052) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iF0tw-0000MK-Qm for bug-gnu-emacs@gnu.org; Mon, 30 Sep 2019 15:00:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iF0tv-0000h3-NY for bug-gnu-emacs@gnu.org; Mon, 30 Sep 2019 15:00:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:51686) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iF0tv-0000gp-Jl; Mon, 30 Sep 2019 15:00:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iF0tv-00031X-1H; Mon, 30 Sep 2019 15:00:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org, bug-cc-mode@gnu.org Resent-Date: Mon, 30 Sep 2019 19:00:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 13367 X-GNU-PR-Package: emacs,cc-mode Original-Received: via spool by 13367-done@debbugs.gnu.org id=D13367.156986995011532 (code D ref 13367); Mon, 30 Sep 2019 19:00:02 +0000 Original-Received: (at 13367-done) by debbugs.gnu.org; 30 Sep 2019 18:59:10 +0000 Original-Received: from localhost ([127.0.0.1]:60507 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iF0t3-0002zw-QQ for submit@debbugs.gnu.org; Mon, 30 Sep 2019 14:59:10 -0400 Original-Received: from colin.muc.de ([193.149.48.1]:51453 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1iF0t1-0002zm-5u for 13367-done@debbugs.gnu.org; Mon, 30 Sep 2019 14:59:07 -0400 Original-Received: (qmail 67353 invoked by uid 3782); 30 Sep 2019 18:59:05 -0000 Original-Received: from acm.muc.de (p4FE15E39.dip0.t-ipconnect.de [79.225.94.57]) by colin.muc.de (tmda-ofmipd) with ESMTP; Mon, 30 Sep 2019 20:59:02 +0200 Original-Received: (qmail 4839 invoked by uid 1000); 30 Sep 2019 18:59:02 -0000 Content-Disposition: inline In-Reply-To: X-Delivery-Agent: TMDA/1.1.12 (Macallan) X-Primary-Address: acm@muc.de 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: 209.51.188.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:167940 Archived-At: Hello, Stefan. On Mon, Sep 30, 2019 at 18:40:59 +0200, Stefan Kangas wrote: > Denis Zalevskiy writes: > > Just create c++ file and enter: > > > > #include > > #include > > > > int main() > > { > > std::vector v; > > std::for_each(v.begin(), v.end(), > > [](int i) { > > switch (i) { > > case 1: > > break; // (1) ok: syntactic symbol is statement-case-intro > > } > > }); > > auto fn = [](int i) { > > switch (i) { > > case 1: > > break; // (2) wrong: syntactic symbol is brace-list-entry > > } > > }; > > > > [](int i) { > > switch (i) { > > case 1: > > break; // (3) ok: syntactic symbol is statement-case-intro > > } > > }; > > return 0; > > } > > > > So, while (1) and (3) are parsed fine, (2) is parsed in a wrong way. > I can't reproduce this on current master, so I'm going to assume that > this has been fixed in the 6 years since this was reported and close > this bug. This has been fixed. I just can't say when and how, without a lot of work. > If this is still an issue, please reopen the bug report. > Best regards, > Stefan Kangas -- Alan Mackenzie (Nuremberg, Germany).