Commit 125c297c by Jason Merrill Committed by Jason Merrill

PR c++/85062 - ICE with alignas in wrong place.

	* decl.c (grokdeclarator): Ignore attributes on type-specifiers
	here.

From-SVN: r258859
parent ddd5c5b7
2018-03-26 Jason Merrill <jason@redhat.com> 2018-03-26 Jason Merrill <jason@redhat.com>
PR c++/85062 - ICE with alignas in wrong place.
* decl.c (grokdeclarator): Ignore attributes on type-specifiers
here.
PR c++/85049 - ICE with __integer_pack. PR c++/85049 - ICE with __integer_pack.
* pt.c (unify_pack_expansion): Don't try to deduce generated packs. * pt.c (unify_pack_expansion): Don't try to deduce generated packs.
* cp-tree.h (TEMPLATE_PARM_P): New. * cp-tree.h (TEMPLATE_PARM_P): New.
......
...@@ -10946,10 +10946,10 @@ grokdeclarator (const cp_declarator *declarator, ...@@ -10946,10 +10946,10 @@ grokdeclarator (const cp_declarator *declarator,
if (declspecs->std_attributes) if (declspecs->std_attributes)
{ {
/* Apply the c++11 attributes to the type preceding them. */ location_t attr_loc = declspecs->locations[ds_std_attribute];
input_location = declspecs->locations[ds_std_attribute]; if (warning_at (attr_loc, OPT_Wattributes, "attribute ignored"))
decl_attributes (&type, declspecs->std_attributes, 0); inform (attr_loc, "an attribute that appertains to a type-specifier "
input_location = saved_loc; "is ignored");
} }
/* Determine the type of the entity declared by recurring on the /* Determine the type of the entity declared by recurring on the
......
// PR c++/85062
// { dg-do compile { target c++11 } }
template<typename... T> struct A
{
int alignas(T...) i; // { dg-warning "ignored" }
};
A<int> a;
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