diff options
| author | Peter Wemm <peter@FreeBSD.org> | 1996-09-18 05:45:16 +0000 |
|---|---|---|
| committer | Peter Wemm <peter@FreeBSD.org> | 1996-09-18 05:45:16 +0000 |
| commit | 9882643d0402167bc96b74ed87d9c94db53b43d2 (patch) | |
| tree | 63294164689f80893cbbe6bd77927b5abe4339e9 /contrib/gcc/c-typeck.c | |
| parent | a4cd5630b060871c42e59f7b95cf1e823c417db6 (diff) | |
Diffstat (limited to 'contrib/gcc/c-typeck.c')
| -rw-r--r-- | contrib/gcc/c-typeck.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/contrib/gcc/c-typeck.c b/contrib/gcc/c-typeck.c index e9d6b2a41963..bae52e323f4a 100644 --- a/contrib/gcc/c-typeck.c +++ b/contrib/gcc/c-typeck.c @@ -5723,6 +5723,8 @@ set_init_index (first, last) error_init ("nonconstant array index in initializer%s", " for `%s'", NULL); else if (last != 0 && TREE_CODE (last) != INTEGER_CST) error_init ("nonconstant array index in initializer%s", " for `%s'", NULL); + else if (! constructor_unfilled_index) + error_init ("array index in non-array initializer%s", " for `%s'", NULL); else if (tree_int_cst_lt (first, constructor_unfilled_index)) error_init ("duplicate array index in initializer%s", " for `%s'", NULL); else |
