aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJason Merrill <jason@gcc.gnu.org>1998-10-28 06:46:03 -0500
committerJason Merrill <jason@gcc.gnu.org>1998-10-28 06:46:03 -0500
commita05273d4c812079f544e9777438354d1904c0f87 (patch)
tree05ad69f4250f8474945ee853b7860e651576b85a /gcc
parent41cdcc108702a4e89e807271204c8fbe8b92cddb (diff)
downloadgcc-a05273d4c812079f544e9777438354d1904c0f87.zip
gcc-a05273d4c812079f544e9777438354d1904c0f87.tar.gz
gcc-a05273d4c812079f544e9777438354d1904c0f87.tar.bz2
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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/cp/ChangeLog2
-rw-r--r--gcc/cp/pt.c8
2 files changed, 3 insertions, 7 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 0c520b5..275ddcf 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -55,8 +55,6 @@
(build_ptrmemfunc): Use type_unknown_p.
(convert_for_assignment): Also do default_conversion on overloaded
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>
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index 12ff526..64d7ec5 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -2546,7 +2546,7 @@ convert_nontype_argument (type, expr)
else
fns = expr;
- fn = instantiate_type (type_pointed_to, fns, 1);
+ fn = instantiate_type (type_pointed_to, fns, 0);
if (fn == error_mark_node)
return error_mark_node;
@@ -2603,21 +2603,19 @@ convert_nontype_argument (type, expr)
tree fns = expr;
tree fn;
- fn = instantiate_type (type_referred_to, fns, 1);
+ fn = instantiate_type (type_referred_to, fns, 0);
if (fn == error_mark_node)
return error_mark_node;
if (!TREE_PUBLIC (fn))
{
-#if 0
if (really_overloaded_fn (fns))
/* Don't issue an error here; we might get a different
function if the overloading had worked out
differently. */
return error_mark_node;
else
-#endif
goto bad_argument;
}
@@ -2684,7 +2682,7 @@ convert_nontype_argument (type, expr)
fns = TREE_OPERAND (expr, 0);
fn = instantiate_type (TREE_TYPE (TREE_TYPE (type)),
- fns, 1);
+ fns, 0);
if (fn == error_mark_node)
return error_mark_node;