2011-05-25 Jason Merrill <jason@redhat.com>
+ PR c++/48599
+ * decl.c (create_array_type_for_decl): Complain about array of auto.
+
PR c++/44944
PR c++/49156
* error.c (dump_template_bindings): Set processing_template_decl
if (type == error_mark_node || size == error_mark_node)
return error_mark_node;
+ /* 8.3.4/1: If the type of the identifier of D contains the auto
+ type-specifier, the program is ill-formed. */
+ if (pedantic && type_uses_auto (type))
+ pedwarn (input_location, OPT_pedantic,
+ "declaration of %qD as array of %<auto%>", name);
+
/* If there are some types which cannot be array elements,
issue an error-message and return. */
switch (TREE_CODE (type))
2011-05-25 Jason Merrill <jason@redhat.com>
+ * g++.dg/cpp0x/auto24.C: New.
+
* g++.dg/cpp0x/error4.C: New.
* g++.dg/cpp0x/rv-restrict.C: New.