aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Stallman <rms@gnu.org>1993-05-29 03:48:35 +0000
committerRichard Stallman <rms@gnu.org>1993-05-29 03:48:35 +0000
commit3ee1e240fe345898bd9c30a503e87f35fe2971b6 (patch)
treeab8c1f51bca2e6cd839c757f9a6f1b1b409e9cc7
parente8b1e86872cd6e19c4c2976646f067c868b74db4 (diff)
downloadgcc-3ee1e240fe345898bd9c30a503e87f35fe2971b6.zip
gcc-3ee1e240fe345898bd9c30a503e87f35fe2971b6.tar.gz
gcc-3ee1e240fe345898bd9c30a503e87f35fe2971b6.tar.bz2
(process_init_constructor): Never set current_index
itself--always store into current_index_node. From-SVN: r4591
-rw-r--r--gcc/c-typeck.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/gcc/c-typeck.c b/gcc/c-typeck.c
index 77599ba..89a838f 100644
--- a/gcc/c-typeck.c
+++ b/gcc/c-typeck.c
@@ -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)