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

--- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Marek Polacek <mpola...@gcc.gnu.org>:

https://gcc.gnu.org/g:adcb497bdba499d161d2e5e8de782bdd6f75d62c

commit r12-925-gadcb497bdba499d161d2e5e8de782bdd6f75d62c
Author: Marek Polacek <pola...@redhat.com>
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.

Reply via email to