summaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authornathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4>2000-01-05 11:45:33 +0000
committernathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4>2000-01-05 11:45:33 +0000
commitbc7c0ddbc888a7a8b037ac058d983fd6d0fba1de (patch)
treee12632332f25ea182a6646a34edfe168554f82c7 /gcc
parent1443f3f9d9b7bf8426c6f9d4dac192d6a0ac5778 (diff)
downloadgcc-bc7c0ddbc888a7a8b037ac058d983fd6d0fba1de.tar.gz
* decl2.c (lookup_arg_dependent): Deal with FNS not being a
FUNCTION_DECL. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@31238 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r--gcc/cp/ChangeLog5
-rw-r--r--gcc/cp/decl2.c7
2 files changed, 10 insertions, 2 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 0870e94fbde..62a5d70c453 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,5 +1,10 @@
2000-01-05 Nathan Sidwell <nathan@acm.org>
+ * decl2.c (lookup_arg_dependent): Deal with FNS not being a
+ FUNCTION_DECL.
+
+2000-01-05 Nathan Sidwell <nathan@acm.org>
+
* typeck.c (build_static_cast): Don't strip target qualifiers
when casting from a class.
diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c
index 3633c12388d..01dc9da72cb 100644
--- a/gcc/cp/decl2.c
+++ b/gcc/cp/decl2.c
@@ -1,5 +1,5 @@
/* Process declarations and variables for C compiler.
- Copyright (C) 1988, 92-98, 1999 Free Software Foundation, Inc.
+ Copyright (C) 1988, 92-99, 2000 Free Software Foundation, Inc.
Hacked by Michael Tiemann (tiemann@cygnus.com)
This file is part of GNU CC.
@@ -4822,6 +4822,7 @@ lookup_arg_dependent (name, fns, args)
tree args;
{
struct arg_lookup k;
+ tree fn = NULL_TREE;
k.name = name;
k.functions = fns;
@@ -4829,7 +4830,9 @@ lookup_arg_dependent (name, fns, args)
/* Note that we've already looked at some namespaces during normal
unqualified lookup, unless we found a decl in function scope. */
- if (fns && DECL_LOCAL_FUNCTION_P (OVL_CURRENT (fns)))
+ if (fns)
+ fn = OVL_CURRENT (fns);
+ if (fn && TREE_CODE (fn) == FUNCTION_DECL && DECL_LOCAL_FUNCTION_P (fn))
k.namespaces = NULL_TREE;
else
unqualified_namespace_lookup (name, 0, &k.namespaces);