Commit d20a70b4 by Catherine Moore Committed by Catherine Moore

c-common.c (decl_attributes): For TYPE_DECLs attach the attribute to the decl.

	* 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.

From-SVN: r33716
parent 37ceff9d
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> 2000-05-05 Richard Henderson <rth@cygnus.com>
* rtlanal.c (reg_overlap_mentioned_p): Treat parallels in the * rtlanal.c (reg_overlap_mentioned_p): Treat parallels in the
......
...@@ -604,7 +604,10 @@ decl_attributes (node, attributes, prefix_attributes) ...@@ -604,7 +604,10 @@ decl_attributes (node, attributes, prefix_attributes)
case A_UNUSED: case A_UNUSED:
if (is_type) 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 else if (TREE_CODE (decl) == PARM_DECL
|| TREE_CODE (decl) == VAR_DECL || TREE_CODE (decl) == VAR_DECL
|| TREE_CODE (decl) == FUNCTION_DECL || TREE_CODE (decl) == FUNCTION_DECL
......
...@@ -2139,6 +2139,7 @@ pushdecl (x) ...@@ -2139,6 +2139,7 @@ pushdecl (x)
DECL_ORIGINAL_TYPE (x) = tt; DECL_ORIGINAL_TYPE (x) = tt;
tt = build_type_copy (tt); tt = build_type_copy (tt);
TYPE_NAME (tt) = x; TYPE_NAME (tt) = x;
TREE_USED (tt) = TREE_USED (x);
TREE_TYPE (x) = tt; TREE_TYPE (x) = tt;
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment