diff options
Diffstat (limited to 'gcc/java/typeck.c')
-rw-r--r-- | gcc/java/typeck.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/gcc/java/typeck.c b/gcc/java/typeck.c index e71b109b7e9..dca14ab5f81 100644 --- a/gcc/java/typeck.c +++ b/gcc/java/typeck.c @@ -33,6 +33,7 @@ The Free Software Foundation is independent of Sun Microsystems, Inc. */ #include "java-tree.h" #include "jcf.h" #include "convert.h" +#include "diagnostic-core.h" #include "toplev.h" #include "ggc.h" @@ -210,7 +211,7 @@ java_array_type_length (tree array_type) tree arfld; if (TREE_CODE (array_type) == POINTER_TYPE) array_type = TREE_TYPE (array_type); - arfld = TREE_CHAIN (TREE_CHAIN (TYPE_FIELDS (array_type))); + arfld = DECL_CHAIN (DECL_CHAIN (TYPE_FIELDS (array_type))); if (arfld != NULL_TREE) { tree index_type = TYPE_DOMAIN (TREE_TYPE (arfld)); @@ -305,7 +306,7 @@ build_java_array_type (tree element_type, HOST_WIDE_INT length) arfld = build_decl (input_location, FIELD_DECL, get_identifier ("data"), atype); DECL_CONTEXT (arfld) = t; - TREE_CHAIN (fld) = arfld; + DECL_CHAIN (fld) = arfld; DECL_ALIGN (arfld) = TYPE_ALIGN (element_type); /* We could layout_class, but that loads java.lang.Object prematurely. @@ -643,7 +644,7 @@ shallow_find_method (tree searched_class, int flags, tree method_name, { tree method; for (method = TYPE_METHODS (searched_class); - method != NULL_TREE; method = TREE_CHAIN (method)) + method != NULL_TREE; method = DECL_CHAIN (method)) { tree method_sig = (*signature_builder) (TREE_TYPE (method)); if (DECL_NAME (method) == method_name && method_sig == signature) @@ -778,7 +779,7 @@ tree lookup_java_constructor (tree clas, tree method_signature) { tree method = TYPE_METHODS (clas); - for ( ; method != NULL_TREE; method = TREE_CHAIN (method)) + for ( ; method != NULL_TREE; method = DECL_CHAIN (method)) { tree method_sig = build_java_signature (TREE_TYPE (method)); if (DECL_CONSTRUCTOR_P (method) && method_sig == method_signature) |