From: apbianco Date: Mon, 13 Mar 2000 21:36:09 +0000 (+0000) Subject: Mon Mar 13 11:36:51 2000 Hans Boehm X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7714a5f416943ea1f30fe7bf576e419a39429727;p=thirdparty%2Fgcc.git Mon Mar 13 11:36:51 2000 Hans Boehm * typeck.c (build_prim_array_type): Correctly set the high word too. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@32512 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog index 305fae8da692..2cfbf3271c94 100644 --- a/gcc/java/ChangeLog +++ b/gcc/java/ChangeLog @@ -1,3 +1,7 @@ +Mon Mar 13 11:36:51 2000 Hans Boehm + + * typeck.c (build_prim_array_type): Correctly set the high word too. + 2000-03-07 Alexandre Petit-Bianco * parse.y (qualify_ambiguous_name): Properly handle expressions diff --git a/gcc/java/typeck.c b/gcc/java/typeck.c index 4a46d42c636b..8ebb4472ab0d 100644 --- a/gcc/java/typeck.c +++ b/gcc/java/typeck.c @@ -360,7 +360,7 @@ build_prim_array_type (element_type, length) tree element_type; HOST_WIDE_INT length; { - tree max_index = build_int_2 (length - 1, 0); + tree max_index = build_int_2 (length - 1, (0 == length ? -1 : 0)); TREE_TYPE (max_index) = sizetype; return build_array_type (element_type, build_index_type (max_index)); }