[gcjx] Patch: FYI: fix type of arrays

Tom Tromey tromey@redhat.com
Tue Mar 8 18:47:00 GMT 2005


I'm checking this in on the gcjx branch.

This changes the type of the "data" field of java arrays.

Tom

Index: ChangeLog
from  Tom Tromey  <tromey@redhat.com>

	* builtins.cc (lay_out_class): Changed type of "data" field of
	arrays.

Index: builtins.cc
===================================================================
RCS file: /cvs/gcc/gcc/gcc/java/Attic/builtins.cc,v
retrieving revision 1.1.2.16
diff -u -r1.1.2.16 builtins.cc
--- builtins.cc 8 Mar 2005 04:04:20 -0000 1.1.2.16
+++ builtins.cc 8 Mar 2005 17:33:15 -0000
@@ -579,7 +579,8 @@
     {
       tree elt_type = map_type (klass->element_type ());
       tree data = build_decl (FIELD_DECL, get_identifier ("data"),
-			      build_array_type (elt_type, type_jint));
+			      build_array_type (elt_type,
+						build_index_type (integer_zero_node)));
       DECL_CONTEXT (data) = klass_record;
       TREE_PUBLIC (data) = 1;
       DECL_ARTIFICIAL (data) = 1;



More information about the Java-patches mailing list