]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
tree.c (decl_type_context): Return NULL_TREE if decl's context is a namespace.
authorBryce McKinlay <bryce@waitaki.otago.ac.nz>
Fri, 24 May 2002 09:19:55 +0000 (09:19 +0000)
committerBryce McKinlay <bryce@gcc.gnu.org>
Fri, 24 May 2002 09:19:55 +0000 (10:19 +0100)
    * tree.c (decl_type_context): Return NULL_TREE if decl's context is a
     namespace.

From-SVN: r53828

gcc/ChangeLog
gcc/tree.c

index bc44ee8a395925c784d04b3ac1d5f0cea9b7eff1..53d4d0dccd86c9e7f01e03f6661648eacd81ebd5 100644 (file)
@@ -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
index 17731c82f235020e103c03119553d62e0e7fd2e3..58ec6f8e5ed487618eb2ef3ca9cc9676b5a1b19a 100644 (file)
@@ -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)