From f4ca236c56cd538011d27f23a2d2f08091fb3c9f Mon Sep 17 00:00:00 2001 From: Richard Kenner Date: Sun, 22 Sep 1996 21:06:39 -0400 Subject: [PATCH] (decl_attribtes, case A_SECTION): Allow for static local variable. From-SVN: r12774 --- gcc/c-common.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gcc/c-common.c b/gcc/c-common.c index 31236f9ac80..45ee4160af9 100644 --- a/gcc/c-common.c +++ b/gcc/c-common.c @@ -498,7 +498,8 @@ decl_attributes (node, attributes, prefix_attributes) && TREE_CODE (TREE_VALUE (args)) == STRING_CST) { if (TREE_CODE (decl) == VAR_DECL - && current_function_decl != NULL_TREE) + && current_function_decl != NULL_TREE + && ! TREE_STATIC (decl)) error_with_decl (decl, "section attribute cannot be specified for local variables"); /* The decl may have already been given a section attribute from -- 2.30.2