summaryrefslogtreecommitdiffstats
path: root/gcc/c-common.c
diff options
context:
space:
mode:
authorkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>1996-09-23 01:06:39 +0000
committerkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>1996-09-23 01:06:39 +0000
commit28f4825ba71219efdf157aaa31b8522a42682af4 (patch)
tree1fd9fa2619d51740ebb80972fca542c1fbd2a555 /gcc/c-common.c
parentbb8d2b8dfe34864ca695ec7bb974874e5939fcaf (diff)
downloadppe42-gcc-28f4825ba71219efdf157aaa31b8522a42682af4.tar.gz
ppe42-gcc-28f4825ba71219efdf157aaa31b8522a42682af4.zip
(decl_attribtes, case A_SECTION): Allow for static local variable.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@12774 138bc75d-0d04-0410-961f-82ee72b054a4
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 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
OpenPOWER on IntegriCloud