+2003-03-10 Jason Merrill <jason@redhat.com>
+
+ PR c++/9868
+ * call.c (resolve_scoped_fn_name): Handle the case of a function
+ pointer member.
+
+ * decl2.c (build_offset_ref_call_from_tree): Only mess with 'this'
+ argument in the pointer-to-member case.
+
2003-03-09 Mark Mitchell <mark@codesourcery.com>
PR c++/9373
if (fn && current_class_type)
fn = (adjust_result_of_qualified_name_lookup
(fn, scope, current_class_type));
+
+ /* It might be the name of a function pointer member. */
+ if (fn && TREE_CODE (fn) == FIELD_DECL)
+ fn = resolve_offset_ref (build_offset_ref (scope, fn));
}
if (!fn)
/* This code is not really correct (for example, it does not
handle the case that `A::f' is overloaded), but it is
historically how we have handled this situation. */
- object_addr = build_unary_op (ADDR_EXPR, TREE_OPERAND (fn, 0), 0);
if (TREE_CODE (TREE_OPERAND (fn, 1)) == FIELD_DECL)
- fn = resolve_offset_ref (fn);
+ /* This case should now be handled elsewhere. */
+ abort ();
else
{
+ object_addr = build_unary_op (ADDR_EXPR, TREE_OPERAND (fn, 0), 0);
fn = TREE_OPERAND (fn, 1);
fn = get_member_function_from_ptrfunc (&object_addr, fn);
+ args = tree_cons (NULL_TREE, object_addr, args);
}
- args = tree_cons (NULL_TREE, object_addr, args);
return build_function_call (fn, args);
}