unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Alan Mackenzie <acm@muc.de>
To: Stefan Kangas <stefan@marxist.se>
Cc: Denis Zalevskiy <denis.zalevskiy@jollamobile.com>,
	13367-done@debbugs.gnu.org
Subject: bug#13367: 24.1; Wrong switch/case indentation inside some c++11 lambdas
Date: Mon, 30 Sep 2019 18:59:02 +0000	[thread overview]
Message-ID: <20190930185902.GC4761@ACM> (raw)
In-Reply-To: <CADwFkm=zFn=5=mBcFPh3hZkpJYsnXoCf4kSYN2ZdsqPKY7WAEA@mail.gmail.com>

Hello, Stefan.

On Mon, Sep 30, 2019 at 18:40:59 +0200, Stefan Kangas wrote:
> Denis Zalevskiy <denis.zalevskiy@jollamobile.com> writes:

> > Just create c++ file and enter:
> >
> > #include <vector>
> > #include <algorithm>
> >
> > int main()
> > {
> >     std::vector<int> 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).





  reply	other threads:[~2019-09-30 18:59 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-06 12:02 bug#13367: 24.1; Wrong switch/case indentation inside some c++11 lambdas Denis Zalevskiy
2019-09-30 16:40 ` Stefan Kangas
2019-09-30 18:59   ` Alan Mackenzie [this message]
2019-09-30 20:27     ` Stefan Kangas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190930185902.GC4761@ACM \
    --to=acm@muc.de \
    --cc=13367-done@debbugs.gnu.org \
    --cc=denis.zalevskiy@jollamobile.com \
    --cc=stefan@marxist.se \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).