Commit cf4763bd by Marek Polacek Committed by Marek Polacek

re PR c++/86063 (g++ ICE at tree check: expected tree_list, have…

re PR c++/86063 (g++ ICE at  tree check: expected tree_list, have expr_pack_expansion in cp_check_const_attributes, at cp/decl2.c:1391)

	PR c++/86063
	* decl2.c (cp_check_const_attributes): Skip trees that are not
	TREE_LISTs.

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

From-SVN: r261613
parent 53e926c8
2018-06-14 Marek Polacek <polacek@redhat.com>
PR c++/86063
* decl2.c (cp_check_const_attributes): Skip trees that are not
TREE_LISTs.
2018-06-14 Jakub Jelinek <jakub@redhat.com>
P0624R2 - Default constructible and assignable stateless lambdas
......
......@@ -1387,7 +1387,8 @@ cp_check_const_attributes (tree attributes)
for (attr = attributes; attr; attr = TREE_CHAIN (attr))
{
tree arg;
for (arg = TREE_VALUE (attr); arg; arg = TREE_CHAIN (arg))
for (arg = TREE_VALUE (attr); arg && TREE_CODE (arg) == TREE_LIST;
arg = TREE_CHAIN (arg))
{
tree expr = TREE_VALUE (arg);
if (EXPR_P (expr))
......
2018-06-14 Marek Polacek <polacek@redhat.com>
PR c++/86063
* g++.dg/cpp0x/gen-attrs-65.C: New test.
2018-06-14 Jakub Jelinek <jakub@redhat.com>
PR target/86048
......
// PR c++/86063
// { dg-do compile { target c++11 } }
template <class... T>
struct S {
[[foobar(alignof(T))...]] char t; // { dg-warning "attribute directive ignored" }
};
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