Commit 07c6ee1b by Nathan Sidwell

expr.c (build_java_arrayaccess): Use convert to change len's type.

	* expr.c (build_java_arrayaccess): Use convert to change
	len's type.

From-SVN: r86307
parent 7368df6f
2004-08-20 Nathan Sidwell <nathan@codesourcery.com>
* expr.c (build_java_arrayaccess): Use convert to change
len's type.
2004-08-19 Bryce McKinlay <mckinlay@redhat.com> 2004-08-19 Bryce McKinlay <mckinlay@redhat.com>
* class.c (make_local_function_alias): Allocate extra space for 'L' * class.c (make_local_function_alias): Allocate extra space for 'L'
...@@ -8587,7 +8592,7 @@ ...@@ -8587,7 +8592,7 @@
properly initialize `finished_label'. Don't emit gotos for empty properly initialize `finished_label'. Don't emit gotos for empty
try statements. try statements.
2000-03-19 Martin v. Löwis <loewis@informatik.hu-berlin.de> 2000-03-19 Martin v. Lwis <loewis@informatik.hu-berlin.de>
* except.c (emit_handlers): Clear catch_clauses_last. * except.c (emit_handlers): Clear catch_clauses_last.
......
...@@ -763,8 +763,8 @@ build_java_arrayaccess (tree array, tree type, tree index) ...@@ -763,8 +763,8 @@ build_java_arrayaccess (tree array, tree type, tree index)
* Note this is equivalent to and more efficient than: * Note this is equivalent to and more efficient than:
* INDEX < 0 || INDEX >= LEN && throw ... */ * INDEX < 0 || INDEX >= LEN && throw ... */
tree test; tree test;
tree len = build_java_array_length_access (array); tree len = convert (unsigned_int_type_node,
TREE_TYPE (len) = unsigned_int_type_node; build_java_array_length_access (array));
test = fold (build2 (GE_EXPR, boolean_type_node, test = fold (build2 (GE_EXPR, boolean_type_node,
convert (unsigned_int_type_node, index), convert (unsigned_int_type_node, index),
len)); len));
......
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