From: Bryce McKinlay Date: Fri, 24 May 2002 09:19:55 +0000 (+0000) Subject: tree.c (decl_type_context): Return NULL_TREE if decl's context is a namespace. X-Git-Tag: releases/gcc-3.3.0~4834 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7efda05490056e0aa23cd533dce528294af6b4b1;p=thirdparty%2Fgcc.git 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 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index bc44ee8a3959..53d4d0dccd86 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2002-05-24 Bryce McKinlay + + * tree.c (decl_type_context): Return NULL_TREE if decl's context is a + namespace. + 2002-05-24 Andreas Jaeger * ggc-page.c (alloc_page): Cast variables of type size_t to diff --git a/gcc/tree.c b/gcc/tree.c index 17731c82f235..58ec6f8e5ed4 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)