diff options
author | Jason Merrill <jason@yorick.cygnus.com> | 1999-04-09 12:43:24 +0000 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 1999-04-09 08:43:24 -0400 |
commit | 09a076233d68120a839c7c4449dbb2b2b0ce3f7a (patch) | |
tree | 588effa66971eefad3281a0eb66e20603d032b29 /gcc/c-common.c | |
parent | 8956b6a1726065df98064a102c79a90c866e15a6 (diff) | |
download | gcc-09a076233d68120a839c7c4449dbb2b2b0ce3f7a.zip gcc-09a076233d68120a839c7c4449dbb2b2b0ce3f7a.tar.gz gcc-09a076233d68120a839c7c4449dbb2b2b0ce3f7a.tar.bz2 |
c-common.c (decl_attributes, [...]): Allow arrays of classes, too.
* c-common.c (decl_attributes, A_INIT_PRIORITY): Allow arrays
of classes, too.
From-SVN: r26312
Diffstat (limited to 'gcc/c-common.c')
-rw-r--r-- | gcc/c-common.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/gcc/c-common.c b/gcc/c-common.c index 8ea1489..18fc729 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 |