Commit 4a34e0e8 by Mark Mitchell Committed by Mark Mitchell

call.c (build_method_call): Issue a more helpful error message about ambiguous method names.

	* call.c (build_method_call): Issue a more helpful error message
	about ambiguous method names.

From-SVN: r55994
parent 74d6b8ca
2002-08-02 Mark Mitchell <mark@codesourcery.com>
* call.c (build_method_call): Issue a more helpful error message
about ambiguous method names.
2002-08-02 Nathan Sidwell <nathan@codesourcery.com>
* tree.c (build_shared_int_cst): Make cache file scope, and
......
......@@ -545,10 +545,16 @@ build_method_call (instance, name, parms, basetype_path, flags)
else if (DECL_P (name))
name = DECL_NAME (name);
if (has_template_args)
fn = lookup_fnfields (object_type, name, /*protect=*/0);
fn = lookup_fnfields (object_type, name, /*protect=*/2);
else
fn = lookup_member (object_type, name, /*protect=*/0,
/*want_type=*/0);
fn = lookup_member (object_type, name, /*protect=*/2, /*want_type=*/0);
if (fn && TREE_CODE (fn) == TREE_LIST && !BASELINK_P (fn))
{
error ("request for member `%D' is ambiguos", name);
print_candidates (fn);
return error_mark_node;
}
/* If the name could not be found, issue an error. */
if (!fn)
......
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