public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "drewb at valvesoftware dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/95883] New: Attributes on lambdas appear to be parsed in the wrong place
Date: Wed, 24 Jun 2020 19:51:33 +0000	[thread overview]
Message-ID: <bug-95883-4@http.gcc.gnu.org/bugzilla/> (raw)

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95883

            Bug ID: 95883
           Summary: Attributes on lambdas appear to be parsed in the wrong
                    place
           Product: gcc
           Version: 9.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: drewb at valvesoftware dot com
  Target Milestone: ---

Created attachment 48782
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48782&action=edit
Artificial source test case

In 90333 there's a discussion of where attributes on lambdas should be
processed.  In 8.3 they were handled after the declarator but that regressed in
9.  90333 says that it was fixed to work properly after the declarator and that
they also added support for attributes before the declarator.  However in
testing against 9.3 attributes after the declarator do not work so it does not
look like the fix is working.

cppreference says that lambda attributes should come after the declarator. 
Testing with godbolt it looks like attributes after the declarator are the
common case (for example clang works on the test case and fails with attributes
before the declarator).

             reply	other threads:[~2020-06-24 19:51 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-24 19:51 drewb at valvesoftware dot com [this message]
2020-06-25 13:09 ` [Bug c++/95883] " ttimo at valvesoftware dot com
2020-06-25 23:32 ` ttimo at valvesoftware dot com
2020-06-29 21:12 ` patrick.a.moran at gmail dot com
2020-06-29 21:15 ` ttimo at valvesoftware dot com
2021-02-26  4:15 ` jason at gcc dot gnu.org

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

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

  git send-email \
    --in-reply-to=bug-95883-4@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /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.
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).