summaryrefslogtreecommitdiffstats
path: root/contrib/gcc/cp/decl2.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/gcc/cp/decl2.c')
-rw-r--r--contrib/gcc/cp/decl2.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/contrib/gcc/cp/decl2.c b/contrib/gcc/cp/decl2.c
index 84f491f..d6fb7bf 100644
--- a/contrib/gcc/cp/decl2.c
+++ b/contrib/gcc/cp/decl2.c
@@ -4892,11 +4892,19 @@ lookup_arg_dependent (name, fns, args)
tree args;
{
struct arg_lookup k;
+
k.name = name;
k.functions = fns;
- k.namespaces = NULL_TREE;
k.classes = NULL_TREE;
-
+
+ /* Note that we've already looked at the current namespace during normal
+ unqualified lookup, unless we found a decl in function scope. */
+ if (fns && ! TREE_PERMANENT (OVL_CURRENT (fns)))
+ k.namespaces = NULL_TREE;
+ else
+ k.namespaces = scratch_tree_cons (current_decl_namespace (),
+ NULL_TREE, NULL_TREE);
+
push_scratch_obstack ();
arg_assoc_args (&k, args);
pop_obstacks ();
OpenPOWER on IntegriCloud