aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPer Bothner <bothner@gcc.gnu.org>1993-09-09 18:04:26 -0700
committerPer Bothner <bothner@gcc.gnu.org>1993-09-09 18:04:26 -0700
commit2bede7299807c7eb79ef4180a0bf10ff97f301c8 (patch)
tree02a86befa71dd50fb876200a895b720a445677bb
parente97b2a1c481e9b269e2defb75d85aa39b037412d (diff)
downloadgcc-2bede7299807c7eb79ef4180a0bf10ff97f301c8.zip
gcc-2bede7299807c7eb79ef4180a0bf10ff97f301c8.tar.gz
gcc-2bede7299807c7eb79ef4180a0bf10ff97f301c8.tar.bz2
Add support for array with non-zero lower bounds. (Used by Chill.)
From-SVN: r5300
-rw-r--r--gcc/c-typeck.c26
1 files changed, 18 insertions, 8 deletions
diff --git a/gcc/c-typeck.c b/gcc/c-typeck.c
index db66823..003c302 100644
--- a/gcc/c-typeck.c
+++ b/gcc/c-typeck.c
@@ -5338,12 +5338,17 @@ really_start_incremental_init (type)
}
else if (TREE_CODE (constructor_type) == ARRAY_TYPE)
{
- constructor_index = copy_node (integer_zero_node);
constructor_range_end = 0;
- constructor_unfilled_index = copy_node (integer_zero_node);
if (TYPE_DOMAIN (constructor_type))
- constructor_max_index
- = TYPE_MAX_VALUE (TYPE_DOMAIN (constructor_type));
+ {
+ constructor_max_index
+ = TYPE_MAX_VALUE (TYPE_DOMAIN (constructor_type));
+ constructor_index
+ = copy_node (TYPE_MIN_VALUE (TYPE_DOMAIN (constructor_type)));
+ }
+ else
+ constructor_index = copy_node (integer_zero_node);
+ constructor_unfilled_index = copy_node (constructor_index);
}
else
{
@@ -5447,12 +5452,17 @@ push_init_level (implicit)
}
else if (TREE_CODE (constructor_type) == ARRAY_TYPE)
{
- constructor_index = copy_node (integer_zero_node);
constructor_range_end = 0;
- constructor_unfilled_index = copy_node (integer_zero_node);
if (TYPE_DOMAIN (constructor_type))
- constructor_max_index
- = TYPE_MAX_VALUE (TYPE_DOMAIN (constructor_type));
+ {
+ constructor_max_index
+ = TYPE_MAX_VALUE (TYPE_DOMAIN (constructor_type));
+ constructor_index
+ = copy_node (TYPE_MIN_VALUE (TYPE_DOMAIN (constructor_type)));
+ }
+ else
+ constructor_index = copy_node (integer_zero_node);
+ constructor_unfilled_index = copy_node (constructor_index);
}
else
{