Commit a05273d4 by Jason Merrill

revert: pt.c (convert_nontype_argument): Tell instantiate_type to complain.

Revert
	* pt.c (convert_nontype_argument): Tell instantiate_type to complain.
	Do complain about overload resolution producing a non-public fn.
Fixes g++.pt/explicit75.C

From-SVN: r23402
parent 41cdcc10
...@@ -55,8 +55,6 @@ ...@@ -55,8 +55,6 @@
(build_ptrmemfunc): Use type_unknown_p. (build_ptrmemfunc): Use type_unknown_p.
(convert_for_assignment): Also do default_conversion on overloaded (convert_for_assignment): Also do default_conversion on overloaded
functions. Hand them off to ocp_convert. functions. Hand them off to ocp_convert.
* pt.c (convert_nontype_argument): Tell instantiate_type to complain.
Do complain about overload resolution producing a non-public fn.
1998-10-26 Mark Mitchell <mark@markmitchell.com> 1998-10-26 Mark Mitchell <mark@markmitchell.com>
......
...@@ -2546,7 +2546,7 @@ convert_nontype_argument (type, expr) ...@@ -2546,7 +2546,7 @@ convert_nontype_argument (type, expr)
else else
fns = expr; fns = expr;
fn = instantiate_type (type_pointed_to, fns, 1); fn = instantiate_type (type_pointed_to, fns, 0);
if (fn == error_mark_node) if (fn == error_mark_node)
return error_mark_node; return error_mark_node;
...@@ -2603,21 +2603,19 @@ convert_nontype_argument (type, expr) ...@@ -2603,21 +2603,19 @@ convert_nontype_argument (type, expr)
tree fns = expr; tree fns = expr;
tree fn; tree fn;
fn = instantiate_type (type_referred_to, fns, 1); fn = instantiate_type (type_referred_to, fns, 0);
if (fn == error_mark_node) if (fn == error_mark_node)
return error_mark_node; return error_mark_node;
if (!TREE_PUBLIC (fn)) if (!TREE_PUBLIC (fn))
{ {
#if 0
if (really_overloaded_fn (fns)) if (really_overloaded_fn (fns))
/* Don't issue an error here; we might get a different /* Don't issue an error here; we might get a different
function if the overloading had worked out function if the overloading had worked out
differently. */ differently. */
return error_mark_node; return error_mark_node;
else else
#endif
goto bad_argument; goto bad_argument;
} }
...@@ -2684,7 +2682,7 @@ convert_nontype_argument (type, expr) ...@@ -2684,7 +2682,7 @@ convert_nontype_argument (type, expr)
fns = TREE_OPERAND (expr, 0); fns = TREE_OPERAND (expr, 0);
fn = instantiate_type (TREE_TYPE (TREE_TYPE (type)), fn = instantiate_type (TREE_TYPE (TREE_TYPE (type)),
fns, 1); fns, 0);
if (fn == error_mark_node) if (fn == error_mark_node)
return error_mark_node; return error_mark_node;
......
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