public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "patrick.a.moran at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/95883] Attributes on lambdas appear to be parsed in the wrong place
Date: Mon, 29 Jun 2020 21:12:11 +0000	[thread overview]
Message-ID: <bug-95883-4-NmngArhKPZ@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-95883-4@http.gcc.gnu.org/bugzilla/>

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

Patrick Moran <patrick.a.moran at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |patrick.a.moran at gmail dot com

--- Comment #3 from Patrick Moran <patrick.a.moran at gmail dot com> ---
My argument in favor of restoring the pre-9-series behavior is that of compiler
portability.  When you have a lambda with a trailing return type that you want
to mark with __attribute__((always_inline)) there's now one syntax that works
with GCCs before 9.1 and with clang (who is matching gcc), and another syntax
that works with GCCs after 9.3, but not with any GCC before 9.3 or any version
of clang.  If you want to write code that works with GCC 8.3 and 10.1, or with
both GCC 10.1 and any clang, then you have to write macros to move the
attributes around.

Whereas if the patch in this bug (or another like it), then at least the one
existing codebase I'm working on won't have to add a macro layer to be able to
support lambdas across our range of supported compilers.

  parent reply	other threads:[~2020-06-29 21:12 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-24 19:51 [Bug c++/95883] New: " drewb at valvesoftware dot com
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 [this message]
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-NmngArhKPZ@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).