This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[c++,committed] Revert patch for PR/c++2294
- From: Bernardo Innocenti <bernie at develer dot com>
- To: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Cc: Giovanni Bajo <giovannibajo at libero dot it>
- Date: Sat, 15 Nov 2003 21:36:30 +0100
- Subject: [c++,committed] Revert patch for PR/c++2294
- Organization: Develer S.r.l.
Hello,
I've reverted my previous mainline commit of a patch by
Giovanni Bajo because it turns out that it causes a build
failure on libjava.
The details are here:
http://gcc.gnu.org/ml/gcc-regression/2003-11/msg00059.html
I didn't pull the testcase accompaning the patch because
it's a useful reminder that the bug still needs attention.
The patch was also backported to the 3_3-branch. For now,
I've left it alone in the branch. It may be that 3.3.3
doesn't trigger the problem. The branch is being
automatically regtested too, isn't it?
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.
diff -u -p -u -p -r1.21 name-lookup.c
--- gcc/cp/name-lookup.c 14 Nov 2003 20:14:08 -0000 1.21
+++ gcc/cp/name-lookup.c 15 Nov 2003 19:32:39 -0000
@@ -2002,7 +2002,7 @@ push_overloaded_decl (tree decl, int fla
}
}
- 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 fla
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 s
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);
--
// Bernardo Innocenti - Develer S.r.l., R&D dept.
\X/ http://www.develer.com/