re PR c++/84609 (internal compiler error: in cp_parser_abort_tentative_parse, at...
authorJakub Jelinek <jakub@redhat.com>
Wed, 28 Feb 2018 18:57:38 +0000 (19:57 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Wed, 28 Feb 2018 18:57:38 +0000 (19:57 +0100)
commit60d2d641a3e48669a941d41c770740f4bbd3d7f1
treebf09f0cbb881e96c7f0ca3ab9fcb4aa987b2397d
parentf6eee6bf4cc9c7b1a9f8f7af82b8fcccefac973a
re PR c++/84609 (internal compiler error: in cp_parser_abort_tentative_parse, at cp/parser.c:28960 (cp_parser_member_declaration()))

PR c++/84609
* parser.c (cp_parser_attributes_opt): Formatting fix.
(cp_parser_skip_balanced_tokens, cp_parser_skip_gnu_attributes_opt,
cp_parser_skip_std_attribute_spec_seq, cp_parser_skip_attributes_opt):
New functions.
(cp_parser_member_declaration): Use cp_parser_skip_attributes_opt
instead of tentative parse to peek over optional attribute tokens
to check for CPP_COLON after them.

* g++.dg/cpp0x/pr84609.C: New test.

From-SVN: r258080
gcc/cp/ChangeLog
gcc/cp/parser.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp0x/pr84609.C [new file with mode: 0644]