+2005-09-16 Mark Mitchell <mark@codesourcery.com>
+
+ PR c++/21514
+ * pt.c (check_instantiated_args): Treat uses of anonymous types as
+ causing type-deduction failure.
+
2005-09-15 Jason Merrill <jason@redhat.com>
PR c++/23357
{
int ix, len = DECL_NTPARMS (tmpl);
bool result = false;
- bool error_p = complain & tf_error;
for (ix = 0; ix != len; ix++)
{
if (nt)
{
- if (TYPE_ANONYMOUS_P (nt))
- error ("%qT is/uses anonymous type", t);
- else
- error ("%qT uses local type %qT", t, nt);
+ /* DR 488 makes use of a type with no linkage causes
+ type deduction to fail. */
+ if (complain & tf_error)
+ {
+ if (TYPE_ANONYMOUS_P (nt))
+ error ("%qT is/uses anonymous type", t);
+ else
+ error ("%qT uses local type %qT", t, nt);
+ }
result = true;
- error_p = true;
}
/* In order to avoid all sorts of complications, we do not
allow variably-modified types as template arguments. */
result = true;
}
}
- if (result && error_p)
+ if (result && (complain & tf_error))
error (" trying to instantiate %qD", tmpl);
return result;
}
+2005-09-16 Mark Mitchell <mark@codesourcery.com>
+
+ PR c++/21514
+ * g++.dg/template/crash19.C: Remove dg-error marker.
+ * g++.dg/template/local4.C: New test.
+
2005-09-16 Paul Brook <paul@codesourcery.com>
PR fortran/23906
int main () {
struct S {};
- // We do not simply use "local|match" on line 10 because we want to
- // make sure that "local" appears.
- // { dg-error "local" "local" { target *-*-* } 10 }
- foo<S> (); // { dg-error "trying|match" }
+ foo<S> (); // { dg-error "match" }
}