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.
* pt.c (unify_pack_expansion): Don't try to deduce generated packs.
* cp-tree.h (TEMPLATE_PARM_P): New.
if (declspecs->std_attributes)
{
- /* Apply the c++11 attributes to the type preceding them. */
- input_location = declspecs->locations[ds_std_attribute];
- decl_attributes (&type, declspecs->std_attributes, 0);
- input_location = saved_loc;
+ location_t attr_loc = declspecs->locations[ds_std_attribute];
+ if (warning_at (attr_loc, OPT_Wattributes, "attribute ignored"))
+ inform (attr_loc, "an attribute that appertains to a type-specifier "
+ "is ignored");
}
/* Determine the type of the entity declared by recurring on the
--- /dev/null
+// PR c++/85062
+// { dg-do compile { target c++11 } }
+
+template<typename... T> struct A
+{
+ int alignas(T...) i; // { dg-warning "ignored" }
+};
+
+A<int> a;