Implement P0028R4, C++17 using attribute namespaces without repetition
authorJakub Jelinek <jakub@redhat.com>
Tue, 13 Sep 2016 19:20:38 +0000 (21:20 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Tue, 13 Sep 2016 19:20:38 +0000 (21:20 +0200)
commit9952908a4b6cf73e8de11af61e1d2c4d67e1b530
tree74f623c862618a148b54782ef57d24472a7727cd
parent63cdb7a08d7f80b32ba7704b72136fff7ae9f995
Implement P0028R4, C++17 using attribute namespaces without repetition

Implement P0028R4, C++17 using attribute namespaces without repetition
* parser.c (cp_parser_std_attribute): Add ATTR_NS argument.  Diagnose
non-NULL ATTR_NS with scoped attribute token.  Handle non-NULL
ATTR_NS with non-scoped attribute tokens.  Allow named ops in
identifier after ::.
(cp_parser_std_attribute_list): Add ATTR_NS argument, pass it down
to cp_parser_std_attribute calls.
(cp_parser_std_attribute_spec): Parse optional C++17
attribute-using-prefix, adjust grammar in function comment.

* g++.dg/cpp0x/gen-attrs-61.C: New test.
* g++.dg/cpp1z/gen-attrs1.C: New test.

From-SVN: r240121
gcc/cp/ChangeLog
gcc/cp/parser.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp0x/gen-attrs-61.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp1z/gen-attrs1.C [new file with mode: 0644]