Commit 206279ba by Bernardo Innocenti Committed by Bernardo Innocenti

re PR c++/2294 (using declaration confusion)

	PR c++/2294
	* name-lookup.c: Revert previous patch for PR c++/2294 to prevent
	build failure on libjava.

From-SVN: r73630
parent c85dfef7
2003-11-15 Bernardo Innocenti <bernie@develer.com>
PR c++/2294
* name-lookup.c: Revert previous patch for PR c++/2294 to prevent
build failure on libjava.
2003-11-14 Giovanni Bajo <giovannibajo@libero.it> 2003-11-14 Giovanni Bajo <giovannibajo@libero.it>
PR c++/2294 PR c++/2294
......
...@@ -2002,7 +2002,7 @@ push_overloaded_decl (tree decl, int flags) ...@@ -2002,7 +2002,7 @@ push_overloaded_decl (tree decl, int flags)
} }
} }
if (!DECL_ARTIFICIAL (decl)) if (old || TREE_CODE (decl) == TEMPLATE_DECL)
{ {
if (old && TREE_CODE (old) != OVERLOAD) if (old && TREE_CODE (old) != OVERLOAD)
new_binding = ovl_cons (decl, ovl_cons (old, NULL_TREE)); new_binding = ovl_cons (decl, ovl_cons (old, NULL_TREE));
...@@ -2012,6 +2012,7 @@ push_overloaded_decl (tree decl, int flags) ...@@ -2012,6 +2012,7 @@ push_overloaded_decl (tree decl, int flags)
OVL_USED (new_binding) = 1; OVL_USED (new_binding) = 1;
} }
else else
/* NAME is not ambiguous. */
new_binding = decl; new_binding = decl;
if (doing_global) if (doing_global)
...@@ -2869,11 +2870,7 @@ set_namespace_binding (tree name, tree scope, tree val) ...@@ -2869,11 +2870,7 @@ set_namespace_binding (tree name, tree scope, tree val)
if (scope == NULL_TREE) if (scope == NULL_TREE)
scope = global_namespace; scope = global_namespace;
b = binding_for_name (NAMESPACE_LEVEL (scope), name); b = binding_for_name (NAMESPACE_LEVEL (scope), name);
if (!b->value if (!b->value || TREE_CODE (val) == OVERLOAD || val == error_mark_node)
/* 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)
b->value = val; b->value = val;
else else
supplement_binding (b, val); supplement_binding (b, val);
......
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