aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorPer Bothner <bothner@gcc.gnu.org>1999-02-19 06:55:24 -0800
committerPer Bothner <bothner@gcc.gnu.org>1999-02-19 06:55:24 -0800
commitc60ca7db2a2b90250208144231af8928acaf8adb (patch)
tree045f793576f8b932d9d74e5de7fed877517ff217 /gcc
parent78d21f929b421db5a72ffa7decf34b420c495ecb (diff)
downloadgcc-c60ca7db2a2b90250208144231af8928acaf8adb.zip
gcc-c60ca7db2a2b90250208144231af8928acaf8adb.tar.gz
gcc-c60ca7db2a2b90250208144231af8928acaf8adb.tar.bz2
parse.y (obtain_incomplete_type): Don't wrap unknown types in TREE_LIST - just chain the POINTER_TYPEs together.
a * parse.y (obtain_incomplete_type): Don't wrap unknown types in TREE_LIST - just chain the POINTER_TYPEs together. (resolve_class): If type already resolved, return decl. After resolving, update TREE_TYPE(class_type), and name (if array). * parse.h (do_resolve_class), parse.y: Make non-static. * class.c (maybe_layout_super_class): Take this_class argument. Do do_resolve_class if necessary. (layout_class, layout_class_methods): Adjust calls appropriately. * parse.h (JDEP_TO_RESOLVE, JDEP_RESOLVED_DECL, JDEP_RESOLVED, JDEP_RESOLVED_P): Redefined for new TREE_LIST-less convention. * typeck.c (build_java_array_type): Don't call layout_class. From-SVN: r25325
Diffstat (limited to 'gcc')
-rw-r--r--gcc/java/typeck.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/gcc/java/typeck.c b/gcc/java/typeck.c
index 7dab3f25..8d99fd8 100644
--- a/gcc/java/typeck.c
+++ b/gcc/java/typeck.c
@@ -404,7 +404,12 @@ build_java_array_type (element_type, length)
TYPE_ALIGN (t) = TYPE_ALIGN (element_type);
pop_obstacks ();
- layout_class (t);
+ /* We could layout_class, but that loads java.lang.Object prematurely.
+ * This is called by the parser, and it is a bad idea to do load_class
+ * in the middle of parsing, because of possible circularity problems. */
+ push_super_field (t, object_type_node);
+ layout_type (t);
+
return t;
}