backport: re PR c++/92648 (Handling of unknown attributes)
commit37c0297f864394ddceba143ad410a6eb44a3119e
authorJakub Jelinek <jakub@redhat.com>
Fri, 14 Feb 2020 11:48:05 +0000 (14 12:48 +0100)
committerJakub Jelinek <jakub@redhat.com>
Fri, 14 Feb 2020 15:01:43 +0000 (14 16:01 +0100)
tree6f6a79c998f8a0c7e46650e0ad87bf0bdc99466a
parent22a7fa8517063c76b069d2b08dca5a9d270798f8
backport: re PR c++/92648 (Handling of unknown attributes)

Backported from mainline
2019-11-26  Jakub Jelinek  <jakub@redhat.com>

PR c++/92648
* parser.c (cp_parser_std_attribute): For unknown attributes,
skip balanced token seq instead of trying to parse
attribute-argument-clause as expression list.

* g++.dg/cpp0x/gen-attrs-71.C: New test.
gcc/cp/ChangeLog
gcc/cp/parser.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp0x/gen-attrs-71.C [new file with mode: 0644]