OSDN Git Service

* c-common.c (decl_attributes): For TYPE_DECLs attach the
authorclm <clm@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 5 May 2000 18:16:49 +0000 (18:16 +0000)
committerclm <clm@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 5 May 2000 18:16:49 +0000 (18:16 +0000)
        attribute to the decl.
        * c-decl.c (pushdecl): Propagate the USED attribute to the
        type copy.

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

gcc/ChangeLog
gcc/c-common.c
gcc/c-decl.c

index 84e96eb..165ba5f 100644 (file)
@@ -1,3 +1,10 @@
+2000-05-05  Catherine Moore  <clm@cygnus.com>
+
+       * c-common.c (decl_attributes):  For TYPE_DECLs attach the
+       attribute to the decl.
+       * c-decl.c (pushdecl): Propagate the USED attribute to the 
+       type copy.
+
 2000-05-05  Richard Henderson  <rth@cygnus.com>
 
        * rtlanal.c (reg_overlap_mentioned_p): Treat parallels in the
index b699405..30985b5 100644 (file)
@@ -604,7 +604,10 @@ decl_attributes (node, attributes, prefix_attributes)
 
        case A_UNUSED:
          if (is_type)
-           TREE_USED (type) = 1;
+           if (decl)
+             TREE_USED (decl) = 1;
+           else
+             TREE_USED (type) = 1;
          else if (TREE_CODE (decl) == PARM_DECL
                   || TREE_CODE (decl) == VAR_DECL
                   || TREE_CODE (decl) == FUNCTION_DECL
index 4d175cb..41e3c82 100644 (file)
@@ -2139,6 +2139,7 @@ pushdecl (x)
              DECL_ORIGINAL_TYPE (x) = tt;
               tt = build_type_copy (tt);
               TYPE_NAME (tt) = x;
+             TREE_USED (tt) = TREE_USED (x);
               TREE_TYPE (x) = tt;
             }
         }