aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree.c
diff options
context:
space:
mode:
authorBryce McKinlay <bryce@waitaki.otago.ac.nz>2002-05-24 09:19:55 +0000
committerBryce McKinlay <bryce@gcc.gnu.org>2002-05-24 10:19:55 +0100
commit7efda05490056e0aa23cd533dce528294af6b4b1 (patch)
tree3ee22b65c0acd2a88905426630f9cb23de592473 /gcc/tree.c
parent397de1ff0f85a82a2547519715f7300e71af847d (diff)
downloadgcc-7efda05490056e0aa23cd533dce528294af6b4b1.zip
gcc-7efda05490056e0aa23cd533dce528294af6b4b1.tar.gz
gcc-7efda05490056e0aa23cd533dce528294af6b4b1.tar.bz2
tree.c (decl_type_context): Return NULL_TREE if decl's context is a namespace.
* tree.c (decl_type_context): Return NULL_TREE if decl's context is a namespace. From-SVN: r53828
Diffstat (limited to 'gcc/tree.c')
-rw-r--r--gcc/tree.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/tree.c b/gcc/tree.c
index 17731c8..58ec6f8 100644
--- a/gcc/tree.c
+++ b/gcc/tree.c
@@ -4212,6 +4212,9 @@ decl_type_context (decl)
while (context)
{
+ if (TREE_CODE (context) == NAMESPACE_DECL)
+ return NULL_TREE;
+
if (TREE_CODE (context) == RECORD_TYPE
|| TREE_CODE (context) == UNION_TYPE
|| TREE_CODE (context) == QUAL_UNION_TYPE)