summaryrefslogtreecommitdiff
path: root/gcc/c-common.c
diff options
context:
space:
mode:
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>1999-04-09 12:43:24 +0000
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>1999-04-09 12:43:24 +0000
commit566f381ce126fad247de3b99a4cc231c00bf9fe5 (patch)
tree588effa66971eefad3281a0eb66e20603d032b29 /gcc/c-common.c
parent076f1f04b15a3fa870d21f93e4820a3a1a1cb3f5 (diff)
downloadgcc-566f381ce126fad247de3b99a4cc231c00bf9fe5.tar.gz
* c-common.c (decl_attributes, A_INIT_PRIORITY): Allow arrays
of classes, too. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@26312 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-common.c')
-rw-r--r--gcc/c-common.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/gcc/c-common.c b/gcc/c-common.c
index 8ea14899a25..18fc72934a3 100644
--- a/gcc/c-common.c
+++ b/gcc/c-common.c
@@ -930,11 +930,14 @@ decl_attributes (node, attributes, prefix_attributes)
pri = TREE_INT_CST_LOW (initp_expr);
+ while (TREE_CODE (type) == ARRAY_TYPE)
+ type = TREE_TYPE (type);
+
if (is_type || TREE_CODE (decl) != VAR_DECL
|| ! TREE_STATIC (decl)
|| DECL_EXTERNAL (decl)
- || (TREE_CODE (TREE_TYPE (decl)) != RECORD_TYPE
- && TREE_CODE (TREE_TYPE (decl)) != UNION_TYPE)
+ || (TREE_CODE (type) != RECORD_TYPE
+ && TREE_CODE (type) != UNION_TYPE)
/* Static objects in functions are initialized the
first time control passes through that
function. This is not precise enough to pin down an