diff options
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/tree.c | 3 |
2 files changed, 8 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index bc44ee8..53d4d0d 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2002-05-24 Bryce McKinlay <bryce@waitaki.otago.ac.nz> + + * tree.c (decl_type_context): Return NULL_TREE if decl's context is a + namespace. + 2002-05-24 Andreas Jaeger <aj@suse.de> * ggc-page.c (alloc_page): Cast variables of type size_t to @@ -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) |