From d20a70b4f6fd784f648d073eaa8434882384b14b Mon Sep 17 00:00:00 2001 From: Catherine Moore Date: Fri, 5 May 2000 18:16:49 +0000 Subject: [PATCH] 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 --- gcc/ChangeLog | 7 +++++++ gcc/c-common.c | 5 ++++- gcc/c-decl.c | 1 + 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 84e96ebd7dc..165ba5ff9ec 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2000-05-05 Catherine Moore + + * 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 * rtlanal.c (reg_overlap_mentioned_p): Treat parallels in the diff --git a/gcc/c-common.c b/gcc/c-common.c index b6994054072..30985b560f8 100644 --- a/gcc/c-common.c +++ b/gcc/c-common.c @@ -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 diff --git a/gcc/c-decl.c b/gcc/c-decl.c index 4d175cb36de..41e3c820cda 100644 --- a/gcc/c-decl.c +++ b/gcc/c-decl.c @@ -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; } } -- 2.30.2