Commit 590b62e9 by Jakub Jelinek Committed by Jakub Jelinek

re PR c++/77637 (ICE on x86_64-linux-gnu (Segmentation fault, tree_check,…

re PR c++/77637 (ICE on x86_64-linux-gnu (Segmentation fault, tree_check, cp_parser_std_attribute_list...))

	PR c++/77637
	* parser.c (cp_parser_std_attribute_list): Reject ... without
	preceding attribute.

	* g++.dg/cpp0x/gen-attrs-62.C: New test.

From-SVN: r240265
parent 377f30c0
2016-09-20 Jakub Jelinek <jakub@redhat.com>
PR c++/77637
* parser.c (cp_parser_std_attribute_list): Reject ... without
preceding attribute.
2016-09-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
PR c++/77434
......
......@@ -24221,8 +24221,12 @@ cp_parser_std_attribute_list (cp_parser *parser, tree attr_ns)
if (token->type == CPP_ELLIPSIS)
{
cp_lexer_consume_token (parser->lexer);
TREE_VALUE (attribute)
= make_pack_expansion (TREE_VALUE (attribute));
if (attribute == NULL_TREE)
error_at (token->location,
"expected attribute before %<...%>");
else
TREE_VALUE (attribute)
= make_pack_expansion (TREE_VALUE (attribute));
token = cp_lexer_peek_token (parser->lexer);
}
if (token->type != CPP_COMMA)
2016-09-20 Jakub Jelinek <jakub@redhat.com>
PR c++/77637
* g++.dg/cpp0x/gen-attrs-62.C: New test.
PR middle-end/77624
* c-c++-common/pr77624-1.c: New test.
* c-c++-common/pr77624-2.c: New test.
......
// PR c++/77637
// { dg-do compile { target c++11 } }
int [[...]] a; // { dg-error "expected attribute before '...'" }
int [[,,...]] b; // { dg-error "expected attribute before '...'" }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment