(process_init_constructor): Never set current_index
authorRichard Stallman <rms@gnu.org>
Sat, 29 May 1993 03:48:35 +0000 (03:48 +0000)
committerRichard Stallman <rms@gnu.org>
Sat, 29 May 1993 03:48:35 +0000 (03:48 +0000)
itself--always store into current_index_node.

From-SVN: r4591

gcc/c-typeck.c

index 77599bab633e00ac6485cd716c68f82e48436b2c..89a838fef8b0e1f45a1917461ed6c0ab16c605f2 100644 (file)
@@ -5254,12 +5254,18 @@ process_init_constructor (type, init, elts, constant_value, constant_element,
                         element.  */
                      warning ("empty array initializer range");
                      tail = TREE_CHAIN (tail);
-                     current_index = end_index;
+                     TREE_INT_CST_LOW (current_index)
+                       = TREE_INT_CST_LOW (end_index);
+                     TREE_INT_CST_HIGH (current_index)
+                       = TREE_INT_CST_HIGH (end_index);
                      continue;
                    }
                  else
                    {
-                     current_index = start_index;
+                     TREE_INT_CST_LOW (current_index)
+                       = TREE_INT_CST_LOW (start_index);
+                     TREE_INT_CST_HIGH (current_index)
+                       = TREE_INT_CST_HIGH (start_index);
                      win = 1;
                      /* See if the first element is also the last.  */
                      if (!tree_int_cst_lt (current_index, end_index))
@@ -5276,7 +5282,10 @@ process_init_constructor (type, init, elts, constant_value, constant_element,
              else
                {
                  constant_expression_warning (index);
-                 current_index = index, win = 1;
+                 TREE_INT_CST_LOW (current_index) = TREE_INT_CST_LOW (index);
+                 TREE_INT_CST_HIGH (current_index)
+                   = TREE_INT_CST_HIGH (index);
+                 win = 1;
                }
 
              if (!win)