From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 7AA6F394482E; Wed, 19 May 2021 17:10:44 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7AA6F394482E From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/100596] [12 Regression] error: attribute appertains to a friend declaration that is not a definition since r12-786-g149061188c7c6ddf Date: Wed, 19 May 2021 17:10:44 +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: 12.0 X-Bugzilla-Keywords: rejects-valid X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: mpolacek at gcc dot gnu.org X-Bugzilla-Target-Milestone: 12.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: 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: Wed, 19 May 2021 17:10:44 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D100596 --- Comment #5 from CVS Commits --- The master branch has been updated by Marek Polacek : https://gcc.gnu.org/g:adcb497bdba499d161d2e5e8de782bdd6f75d62c commit r12-925-gadcb497bdba499d161d2e5e8de782bdd6f75d62c Author: Marek Polacek Date: Tue May 18 16:11:16 2021 -0400 c++: Relax attribute on friend declaration checking [PR100596] It turned out that there are codebases that profusely use GNU attributes on friend declarations, so we have to dial back our checking and allow them. And for C++11 attributes let's just warn instead of giving errors. PR c++/100596 gcc/cp/ChangeLog: * cp-tree.h (any_non_type_attribute_p): Remove. * decl.c (grokdeclarator): Turn an error into a warning and only warn for standard attributes. * decl2.c (any_non_type_attribute_p): Remove. * parser.c (cp_parser_elaborated_type_specifier): Turn an error into a warning and only warn for standard attributes. (cp_parser_member_declaration): Likewise. gcc/testsuite/ChangeLog: * g++.dg/cpp0x/friend7.C: Turn a few dg-warnings into dg-errors. Remove dg-errors for GNU attributes. * g++.dg/ext/attrib63.C: Remove dg-error. * g++.dg/cpp0x/friend8.C: New test.=