* typeck.c (build_x_function_call): Resolve an OFFSET_REF.
* call.c (joust): Exit early if we get the same function, too.
* decl2.c (key_method): Return NULL_TREE for template classes.
(import_export_class): Don't need to check for template classes.
From-SVN: r33273
+2000-04-20 Jason Merrill <jason@casey.cygnus.com>
+
+ * typeck.c (build_x_function_call): Resolve an OFFSET_REF.
+
+ * call.c (joust): Exit early if we get the same function, too.
+
+ * decl2.c (key_method): Return NULL_TREE for template classes.
+ (import_export_class): Don't need to check for template classes.
+
2000-04-18 Zack Weinberg <zack@wolery.cumb.org>
* lex.c: Remove references to cccp.c.
return -1;
/* If we have two pseudo-candidates for conversions to the same type,
- arbitrarily pick one. */
- if (TYPE_P (cand1->fn) && cand1->fn == cand2->fn)
+ or two candidates for the same function, arbitrarily pick one. */
+ if (cand1->fn == cand2->fn
+ && (TYPE_P (cand1->fn) || DECL_P (cand1->fn)))
return 1;
/* a viable function F1
tree method;
if (TYPE_FOR_JAVA (type)
+ || CLASSTYPE_TEMPLATE_INSTANTIATION (type)
|| CLASSTYPE_INTERFACE_KNOWN (type))
return NULL_TREE;
/* Base our import/export status on that of the first non-inline,
non-pure virtual function, if any. */
if (import_export == 0
- && TYPE_POLYMORPHIC_P (ctype)
- && ! CLASSTYPE_TEMPLATE_INSTANTIATION (ctype))
+ && TYPE_POLYMORPHIC_P (ctype))
{
tree method = key_method (ctype);
if (method)
TYPE_BINFO (type), LOOKUP_NORMAL);
}
+ if (TREE_CODE (function) == OFFSET_REF)
+ function = resolve_offset_ref (function);
+
if ((TREE_CODE (function) == FUNCTION_DECL
&& DECL_STATIC_FUNCTION_P (function))
|| (TREE_CODE (function) == TEMPLATE_DECL
return build_method_call (decl, function, params,
NULL_TREE, LOOKUP_NORMAL);
}
- else if (TREE_CODE (function) == OFFSET_REF)
- my_friendly_abort (20000406);
else if (TREE_CODE (function) == COMPONENT_REF
&& type == unknown_type_node)
{