From 3c28fc742591b42850bd8422a85e73621a6ec5e3 Mon Sep 17 00:00:00 2001 From: Jason Merrill Date: Mon, 8 Dec 2003 18:15:30 -0500 Subject: name-lookup.c, [...]: Revert Giovanni's patch from yesterday. * name-lookup.c, init.c, except.c: Revert Giovanni's patch from yesterday. From-SVN: r74446 --- gcc/cp/name-lookup.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) (limited to 'gcc/cp/name-lookup.c') diff --git a/gcc/cp/name-lookup.c b/gcc/cp/name-lookup.c index 7446b30..ec8a634 100644 --- a/gcc/cp/name-lookup.c +++ b/gcc/cp/name-lookup.c @@ -2006,11 +2006,7 @@ push_overloaded_decl (tree decl, int flags) } } - /* FIXME: We should build OVERLOADs for all function declarations here. - But right now, there are too many places where the code creates an - artificial declaration and expects the name to be bound exactly - to a FUNCTION_DECL. */ - if (!DECL_ARTIFICIAL (decl)) + if (old || TREE_CODE (decl) == TEMPLATE_DECL) { if (old && TREE_CODE (old) != OVERLOAD) new_binding = ovl_cons (decl, ovl_cons (old, NULL_TREE)); @@ -2020,6 +2016,7 @@ push_overloaded_decl (tree decl, int flags) OVL_USED (new_binding) = 1; } else + /* NAME is not ambiguous. */ new_binding = decl; if (doing_global) @@ -2877,11 +2874,7 @@ set_namespace_binding (tree name, tree scope, tree val) if (scope == NULL_TREE) scope = global_namespace; b = binding_for_name (NAMESPACE_LEVEL (scope), name); - if (!b->value - /* If OVL_CHAIN is NULL, it's the first FUNCTION_DECL for this name, - and we still need to call supplement_binding. */ - || (TREE_CODE (val) == OVERLOAD && OVL_CHAIN (val)) - || val == error_mark_node) + if (!b->value || TREE_CODE (val) == OVERLOAD || val == error_mark_node) b->value = val; else supplement_binding (b, val); -- cgit v1.1