* c-decl.c (pushdecl): Use TYPE_CONTEXT rather than TREE_PERMANENT.
authorlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 18 Oct 1999 08:40:20 +0000 (08:40 +0000)
committerlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 18 Oct 1999 08:40:20 +0000 (08:40 +0000)
        (finish_decl): Duplicate test for TREE_ASM_WRITTEN in else branch of
        if that tests TREE_PERMANENT.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@30068 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/c-decl.c

index 4bbe8e9..8dcde75 100644 (file)
@@ -1,3 +1,9 @@
+Mon Oct 18 02:38:46 1999  Bernd Schmidt  <bernds@cygnus.co.uk>
+
+       * c-decl.c (pushdecl): Use TYPE_CONTEXT rather than TREE_PERMANENT.
+       (finish_decl): Duplicate test for TREE_ASM_WRITTEN in else branch of
+       if that tests TREE_PERMANENT.
+
 Mon Oct 18 01:41:35 1999  Jeffrey A Law  (law@cygnus.com)
 
        * combine.c (get_last_value): If the last set of a register
index 3a38c4f..ab1c053 100644 (file)
@@ -2220,7 +2220,7 @@ pushdecl (x)
            {
              if (type == error_mark_node)
                break;
-             if (! TREE_PERMANENT (type))
+             if (! TYPE_CONTEXT (type))
                {
                  warning_with_decl (x, "type of external `%s' is not global");
                  /* By exiting the loop early, we leave TYPE nonzero,
@@ -3606,7 +3606,9 @@ finish_decl (decl, init, asmspec_tree)
        {
          /* This is a no-op in c-lang.c or something real in objc-actions.c.  */
          maybe_objc_check_decl (decl);
-         rest_of_decl_compilation (decl, asmspec, DECL_CONTEXT (decl) == 0,
+         rest_of_decl_compilation (decl, asmspec,
+                                   (DECL_CONTEXT (decl) == 0
+                                    || TREE_ASM_WRITTEN (decl)),
                                    0);
        }
       if (DECL_CONTEXT (decl) != 0)