PR c++/83824
commitd60daad1a57a9814cd6bb90dea19e6a5c22d4c37
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 17 Jan 2018 23:42:36 +0000 (17 23:42 +0000)
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 17 Jan 2018 23:42:36 +0000 (17 23:42 +0000)
treec2feaf80b936a5497948de764c734bf6578d3319
parent5db6ff227c3e9e3e1177f3e043b63b6278d9e06f
PR c++/83824
* parser.c (attr_chainon): New function.
(cp_parser_label_for_labeled_statement, cp_parser_decl_specifier_seq,
cp_parser_namespace_definition, cp_parser_init_declarator,
cp_parser_type_specifier_seq, cp_parser_parameter_declaration,
cp_parser_gnu_attributes_opt): Use it.
(cp_parser_member_declaration, cp_parser_objc_class_ivars,
cp_parser_objc_struct_declaration): Likewise.  Don't reset
prefix_attributes if attributes is error_mark_node.

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

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@256823 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/cp/ChangeLog
gcc/cp/parser.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp0x/pr83824.C [new file with mode: 0644]