PR c++/37288
* pt.c (dependent_type_p): Don't abort on auto outside of a template.
From-SVN: r139811
+2008-08-30 Jason Merrill <jason@redhat.com>
+
+ PR c++/37288
+ * pt.c (dependent_type_p): Don't abort on auto outside of a template.
+
2008-08-29 Jason Merrill <jason@redhat.com>
Implement C++0x 'auto' semantics.
/* If we are not processing a template, then nobody should be
providing us with a dependent type. */
gcc_assert (type);
- gcc_assert (TREE_CODE (type) != TEMPLATE_TYPE_PARM);
+ gcc_assert (TREE_CODE (type) != TEMPLATE_TYPE_PARM || is_auto (type));
return false;
}
A<int> A1;
// CWG issue 625
A<auto> A2 = A1; // { dg-error "auto" }
+
+auto foo() { } // { dg-error "auto" }
+
+void bar(auto i) // { dg-error "incomplete|auto" }
+{
+ (void)i;
+}