1998-10-28 Jason Merrill <jason@yorick.cygnus.com>
+ * class.c (instantiate_type): Don't consider templates for a normal
+ match.
+
* class.c (finish_struct_1): Don't complain about non-copy
assignment ops in union members.
(finish_prevtable_vardecl): Lose.
(finish_file): Don't call it.
* pt.c (instantiate_class_template): Likewise.
+ * cp-tree.h: Remove it.
* init.c (build_delete): Reset TYPE_HAS_DESTRUCTOR here.
* decl.c (finish_function): Not here.
else for (elems = rhs; elems; elems = OVL_CHAIN (elems))
{
elem = OVL_FUNCTION (elems);
- if (comptypes (lhstype, TREE_TYPE (elem), 1))
+ if (TREE_CODE (elem) == FUNCTION_DECL
+ && comptypes (lhstype, TREE_TYPE (elem), 1))
{
mark_used (elem);
return elem;
for (elems = rhs; elems; elems = OVL_NEXT (elems))
{
elem = OVL_CURRENT (elems);
- if (comp_target_types (lhstype, TREE_TYPE (elem), 1) > 0)
+ if (TREE_CODE (elem) == FUNCTION_DECL
+ && comp_target_types (lhstype, TREE_TYPE (elem), 1) > 0)
break;
}
if (elems)
elems = OVL_CHAIN (elems))
{
elem = OVL_FUNCTION (elems);
- if (comp_target_types (lhstype, TREE_TYPE (elem), 0) > 0)
+ if (TREE_CODE (elem) == FUNCTION_DECL
+ && comp_target_types (lhstype, TREE_TYPE (elem), 0) >0)
break;
}
if (elems)