2005-06-17 Geoffrey Keating <geoffk@apple.com>
PR c++/17413
* pt.c (type_unification_real): Apply template type deduction even
to procedure parameters that are not dependent on a template
parameter.
Index: testsuite/ChangeLog
2005-06-17 Geoffrey Keating <geoffk@apple.com>
PR c++/17413
* g++.dg/template/local5.C: New.
From-SVN: r101141
+2005-06-17 Geoffrey Keating <geoffk@apple.com>
+
+ PR c++/17413
+ * pt.c (type_unification_real): Apply template type deduction even
+ to procedure parameters that are not dependent on a template
+ parameter.
+
2005-06-16 Nathan Sidwell <nathan@codesourcery.com>
* rtti.c (get_tinfo_decl): Avoid caching tinfo_descs when it might
else
type = arg;
- if (strict == DEDUCE_EXACT)
- {
- if (same_type_p (parm, type))
- continue;
- }
- else
- /* It might work; we shouldn't check now, because we might
- get into infinite recursion. Overload resolution will
- handle it. */
+ if (same_type_p (parm, type))
continue;
-
+ if (strict != DEDUCE_EXACT
+ && can_convert_arg (parm, type, TYPE_P (arg) ? NULL_TREE : arg))
+ continue;
+
return 1;
}
+2005-06-17 Geoffrey Keating <geoffk@apple.com>
+
+ PR c++/17413
+ * g++.dg/template/local5.C: New.
+
2005-06-17 Richard Henderson <rth@redhat.com>
* gcc.dg/sync-2.c (do_qi): Cast negative results to char.
--- /dev/null
+struct Attribute { };
+
+template <class T> bool operator == (const Attribute &attr, const T &value);
+
+enum {
+ anon = 123
+};
+
+void test(int foo)
+{
+ if (foo == anon) ; /* { dg-bogus "anonymous type" } */
+}