[Bug c++/83824] [6/7/8 Regression] ICE on invalid C++ code with alignas: in chainon, at tree.c:3037
jakub at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Jan 17 23:43:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83824
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Author: jakub
Date: Wed Jan 17 23:42:36 2018
New Revision: 256823
URL: https://gcc.gnu.org/viewcvs?rev=256823&root=gcc&view=rev
Log:
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.
Added:
trunk/gcc/testsuite/g++.dg/cpp0x/pr83824.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/parser.c
trunk/gcc/testsuite/ChangeLog
More information about the Gcc-bugs
mailing list