Commit fad86f7a by Geoffrey Keating Committed by Geoffrey Keating

re PR c++/17413 (local classes as template argument)

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
parent 9498a22f
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
......
......@@ -9366,17 +9366,12 @@ type_unification_real (tree tparms,
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.
......
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" } */
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment