diff options
author | bernie <bernie@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-11-15 19:34:57 +0000 |
---|---|---|
committer | bernie <bernie@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-11-15 19:34:57 +0000 |
commit | 90beeb86f9e2fb916e0a13c61ac397241f4d3ee8 (patch) | |
tree | fd72198c53ff6c7f335ca3efe504eaecd78af61d /gcc/cp | |
parent | 18adc1ff3b97fd653b9c293aaabd866d8eb0cb51 (diff) | |
download | gcc-90beeb86f9e2fb916e0a13c61ac397241f4d3ee8.tar.gz |
PR c++/2294
* name-lookup.c: Revert previous patch for PR c++/2294 to prevent
build failure on libjava.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@73630 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp')
-rw-r--r-- | gcc/cp/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/cp/name-lookup.c | 9 |
2 files changed, 9 insertions, 6 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index e773b79c834..eb3b0f0f511 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +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> PR c++/2294 diff --git a/gcc/cp/name-lookup.c b/gcc/cp/name-lookup.c index bb4b0ac68dd..a31aeebbcaf 100644 --- a/gcc/cp/name-lookup.c +++ b/gcc/cp/name-lookup.c @@ -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) new_binding = ovl_cons (decl, ovl_cons (old, NULL_TREE)); @@ -2012,6 +2012,7 @@ push_overloaded_decl (tree decl, int flags) OVL_USED (new_binding) = 1; } else + /* NAME is not ambiguous. */ new_binding = decl; if (doing_global) @@ -2869,11 +2870,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); |