PR c++/46145
* decl.c (grokdeclarator): Complain about auto typedef.
From-SVN: r174228
2011-05-25 Jason Merrill <jason@redhat.com>
+ PR c++/46145
+ * decl.c (grokdeclarator): Complain about auto typedef.
+
PR c++/46245
* decl.c (grokdeclarator): Complain later for auto parameter.
* pt.c (splice_late_return_type): Handle use in a template
memfn_quals = TYPE_UNQUALIFIED;
}
+ if (type_uses_auto (type))
+ {
+ error ("typedef declared %<auto%>");
+ type = error_mark_node;
+ }
+
if (decl_context == FIELD)
decl = build_lang_decl (TYPE_DECL, unqualified_id, type);
else
2011-05-25 Jason Merrill <jason@redhat.com>
+ * g++.dg/cpp0x/auto9.C: Add typedef test.
+
* g++.dg/cpp0x/auto23.C: New.
* g++.dg/cpp0x/auto9.C: Adjust.
void qq (auto); // { dg-error "auto" }
void qr (auto*); // { dg-error "auto" }
+
+// PR c++/46145
+typedef auto autot; // { dg-error "auto" }