diff options
author | aldyh <aldyh@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-02-25 07:22:37 +0000 |
---|---|---|
committer | aldyh <aldyh@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-02-25 07:22:37 +0000 |
commit | b345b1ff8d074be44c491e045ba4e985fde0a333 (patch) | |
tree | 480ca7c1b8fdc37050cbd5a1017dc46928f30a01 | |
parent | 6e7f702e27a2f22c9c6c42e60eba10df86eeac76 (diff) | |
download | gcc-b345b1ff8d074be44c491e045ba4e985fde0a333.tar.gz |
2002-02-25 Aldy Hernandez <aldyh@redhat.com>
* c-typeck.c (push_init_level): Handle vectors.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@50021 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/c-typeck.c | 8 |
2 files changed, 12 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index c510a9a2900..2f01984633f 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2002-02-25 Aldy Hernandez <aldyh@redhat.com> + + * c-typeck.c (push_init_level): Handle vectors. + 2002-02-25 Alexandre Oliva <aoliva@redhat.com> * config/sparc/sparc.c (const64_high_operand): Zero-extend diff --git a/gcc/c-typeck.c b/gcc/c-typeck.c index 4ee7cb3b697..4a804389ce1 100644 --- a/gcc/c-typeck.c +++ b/gcc/c-typeck.c @@ -5384,6 +5384,14 @@ push_init_level (implicit) constructor_unfilled_fields = constructor_fields; constructor_bit_index = bitsize_zero_node; } + else if (TREE_CODE (constructor_type) == VECTOR_TYPE) + { + /* Vectors are like simple fixed-size arrays. */ + constructor_max_index = + build_int_2 (TYPE_VECTOR_SUBPARTS (constructor_type) - 1, 0); + constructor_index = convert (bitsizetype, integer_zero_node); + constructor_unfilled_index = constructor_index; + } else if (TREE_CODE (constructor_type) == ARRAY_TYPE) { if (TYPE_DOMAIN (constructor_type)) |