diff options
author | Richard Kenner <kenner@gcc.gnu.org> | 1995-06-27 16:42:57 -0400 |
---|---|---|
committer | Richard Kenner <kenner@gcc.gnu.org> | 1995-06-27 16:42:57 -0400 |
commit | 1a16a053da4892ff65aacec22be8e711c524d14e (patch) | |
tree | 682c3750a415cdebbfcd6308830cb47e7c61fd07 /gcc/c-common.c | |
parent | c645b1c9abd8433e95dfc0f365df9ef163917a11 (diff) | |
download | gcc-1a16a053da4892ff65aacec22be8e711c524d14e.zip gcc-1a16a053da4892ff65aacec22be8e711c524d14e.tar.gz gcc-1a16a053da4892ff65aacec22be8e711c524d14e.tar.bz2 |
(decl_attributes, case A_CONSTRUCTOR, A_DESTRUCTOR): Set TREE_USED.
From-SVN: r10064
Diffstat (limited to 'gcc/c-common.c')
-rw-r--r-- | gcc/c-common.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/gcc/c-common.c b/gcc/c-common.c index b45b2e6..1d26ebf 100644 --- a/gcc/c-common.c +++ b/gcc/c-common.c @@ -396,7 +396,10 @@ decl_attributes (node, attributes, prefix_attributes) if (TREE_CODE (decl) == FUNCTION_DECL && TREE_CODE (type) == FUNCTION_TYPE && decl_function_context (decl) == 0) - DECL_STATIC_CONSTRUCTOR (decl) = 1; + { + DECL_STATIC_CONSTRUCTOR (decl) = 1; + TREE_USED (decl) = 1; + } else warning ("`%s' attribute ignored", IDENTIFIER_POINTER (name)); break; @@ -405,7 +408,10 @@ decl_attributes (node, attributes, prefix_attributes) if (TREE_CODE (decl) == FUNCTION_DECL && TREE_CODE (type) == FUNCTION_TYPE && decl_function_context (decl) == 0) - DECL_STATIC_DESTRUCTOR (decl) = 1; + { + DECL_STATIC_DESTRUCTOR (decl) = 1; + TREE_USED (decl) = 1; + } else warning ("`%s' attribute ignored", IDENTIFIER_POINTER (name)); break; |