aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-common.c
diff options
context:
space:
mode:
authorRichard Kenner <kenner@gcc.gnu.org>1996-09-22 21:06:39 -0400
committerRichard Kenner <kenner@gcc.gnu.org>1996-09-22 21:06:39 -0400
commitf4ca236c56cd538011d27f23a2d2f08091fb3c9f (patch)
tree1fd9fa2619d51740ebb80972fca542c1fbd2a555 /gcc/c-common.c
parent903cb4d6f2ede8692a6cbac3042055ab38298bd3 (diff)
downloadgcc-f4ca236c56cd538011d27f23a2d2f08091fb3c9f.zip
gcc-f4ca236c56cd538011d27f23a2d2f08091fb3c9f.tar.gz
gcc-f4ca236c56cd538011d27f23a2d2f08091fb3c9f.tar.bz2
(decl_attribtes, case A_SECTION): Allow for static local variable.
From-SVN: r12774
Diffstat (limited to 'gcc/c-common.c')
-rw-r--r--gcc/c-common.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/c-common.c b/gcc/c-common.c
index 31236f9..45ee416 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