]> gcc.gnu.org Git - gcc.git/commitdiff
c-typeck.c (push_init_level): Handle vectors.
authorAldy Hernandez <aldyh@redhat.com>
Mon, 25 Feb 2002 07:22:37 +0000 (07:22 +0000)
committerAldy Hernandez <aldyh@gcc.gnu.org>
Mon, 25 Feb 2002 07:22:37 +0000 (07:22 +0000)
2002-02-25  Aldy Hernandez  <aldyh@redhat.com>

        * c-typeck.c (push_init_level): Handle vectors.

From-SVN: r50021

gcc/ChangeLog
gcc/c-typeck.c

index c510a9a29009a85d4bd9c9df671b166b90196e7d..2f01984633f7e5711e62ada78054101abdd3c000 100644 (file)
@@ -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
index 4ee7cb3b69757f38e4f1f8cb1d3ac52a2e38d4f3..4a804389ce1f604b603a113b2aa4794cee74b56a 100644 (file)
@@ -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))
This page took 0.083657 seconds and 5 git commands to generate.