Commit 46089b86 by Hans Boehm Committed by Alexandre Petit-Bianco

typeck.c (build_prim_array_type): Correctly set the high word too.

Mon Mar 13 11:36:51 2000  Hans Boehm <boehm@acm.org>

	* typeck.c (build_prim_array_type): Correctly set the high word too.

From-SVN: r32512
parent f0c988c8
Mon Mar 13 11:36:51 2000 Hans Boehm <boehm@acm.org>
* typeck.c (build_prim_array_type): Correctly set the high word too.
2000-03-07 Alexandre Petit-Bianco <apbianco@cygnus.com> 2000-03-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.y (qualify_ambiguous_name): Properly handle expressions * parse.y (qualify_ambiguous_name): Properly handle expressions
......
...@@ -360,7 +360,7 @@ build_prim_array_type (element_type, length) ...@@ -360,7 +360,7 @@ build_prim_array_type (element_type, length)
tree element_type; tree element_type;
HOST_WIDE_INT length; 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; TREE_TYPE (max_index) = sizetype;
return build_array_type (element_type, build_index_type (max_index)); return build_array_type (element_type, build_index_type (max_index));
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment