diff options
Diffstat (limited to 'gcc/java/check-init.c')
-rw-r--r-- | gcc/java/check-init.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/gcc/java/check-init.c b/gcc/java/check-init.c index f8b1736..377ac78 100644 --- a/gcc/java/check-init.c +++ b/gcc/java/check-init.c @@ -918,9 +918,11 @@ check_init (tree exp, words before) case NEW_ARRAY_INIT: { - tree x = CONSTRUCTOR_ELTS (TREE_OPERAND (exp, 0)); - for ( ; x != NULL_TREE; x = TREE_CHAIN (x)) - check_init (TREE_VALUE (x), before); + tree value; + unsigned HOST_WIDE_INT idx; + FOR_EACH_CONSTRUCTOR_VALUE (CONSTRUCTOR_ELTS (TREE_OPERAND (exp, 0)), + idx, value) + check_init (value, before); } break; |