From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 5961D389851A; Mon, 29 Jun 2020 21:12:11 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5961D389851A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1593465131; bh=U4DjlV0fbReDM3Qwzk3eELyBwEDlSW6VGlHV7LgbjKo=; h=From:To:Subject:Date:In-Reply-To:References:From; b=OGMNWlwyIV7tCifI7hvSyGdmgS8R0Jmv0cXaPMT0D5goRbK9X9Hw73ZW+wxbsVThb /zgsvmCsLygn/b1AMisitAqx4B9loycV2FaPhTxOcIOciQ8ftW4jOkC0Kqv+Fe/sR0 w2miw4Bp3Xc2C9U4VJI47pItEo1nDTMHw37ku47c= From: "patrick.a.moran at gmail dot com" 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 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 9.3.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: patrick.a.moran at gmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jun 2020 21:12:11 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D95883 Patrick Moran changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |patrick.a.moran at gmail d= ot com --- Comment #3 from Patrick Moran --- My argument in favor of restoring the pre-9-series behavior is that of comp= iler portability. When you have a lambda with a trailing return type that you w= ant to mark with __attribute__((always_inline)) there's now one syntax that wor= ks with GCCs before 9.1 and with clang (who is matching gcc), and another synt= ax that works with GCCs after 9.3, but not with any GCC before 9.3 or any vers= ion of clang. If you want to write code that works with GCC 8.3 and 10.1, or w= ith 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.=