From 1a16a053da4892ff65aacec22be8e711c524d14e Mon Sep 17 00:00:00 2001 From: Richard Kenner Date: Tue, 27 Jun 1995 16:42:57 -0400 Subject: [PATCH] (decl_attributes, case A_CONSTRUCTOR, A_DESTRUCTOR): Set TREE_USED. From-SVN: r10064 --- gcc/c-common.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/gcc/c-common.c b/gcc/c-common.c index b45b2e67c04..1d26ebfa9fa 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; -- 2.30.2