aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/java/ChangeLog20
-rw-r--r--gcc/java/expr.c5
-rw-r--r--gcc/java/typeck.c3
3 files changed, 21 insertions, 7 deletions
diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog
index de49f42..b90c76b 100644
--- a/gcc/java/ChangeLog
+++ b/gcc/java/ChangeLog
@@ -22,6 +22,20 @@
patch_throw_statement, check_thrown_exceptions,
patch_conditional_expr): Likewise.
+1999-12-17 Tom Tromey <tromey@cygnus.com>
+
+ * gjavah.c (decode_signature_piece): Print "::" in JArray<>. This
+ fixes PR gcj/119.
+ (process_file): Use `\n\' at end of each line in string.
+
+Thu Dec 16 00:09:45 1999 Alexandre Petit-Bianco <apbianco@cygnus.com>
+
+ * expr.c (expand_invoke): Layout the loaded class before
+ attempting to use it.
+ (expand_java_field_op): Allow final field assignments to take
+ place in $finit$.
+ * typeck.c (convert): Return error_mark_node if expr is null.
+
1999-12-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
* class.c (class_depth): Return -1 if the class doesn't load
@@ -47,12 +61,6 @@
* typeck.c (lookup_java_method): Take WFLs in method names into
account.
-1999-12-17 Tom Tromey <tromey@cygnus.com>
-
- * gjavah.c (decode_signature_piece): Print "::" in JArray<>. This
- fixes PR gcj/119.
- (process_file): Use `\n\' at end of each line in string.
-
Tue Dec 14 14:20:16 1999 Per Bothner <per@bothner.com>
* class.c (make_class_data): flag_keep_inline_functions to keep
diff --git a/gcc/java/expr.c b/gcc/java/expr.c
index d789efb..1b8d1a1 100644
--- a/gcc/java/expr.c
+++ b/gcc/java/expr.c
@@ -1645,6 +1645,7 @@ expand_invoke (opcode, method_ref_index, nargs)
if (! CLASS_LOADED_P (self_type))
{
load_class (self_type, 1);
+ safe_layout_class (self_type);
if (TREE_CODE (TYPE_SIZE (self_type)) == ERROR_MARK)
fatal ("failed to find class '%s'", self_name);
}
@@ -1816,7 +1817,9 @@ expand_java_field_op (is_static, is_putting, field_ref_index)
}
else
{
- if (! DECL_CONSTRUCTOR_P (current_function_decl))
+ tree cfndecl_name = DECL_NAME (current_function_decl);
+ if (! DECL_CONSTRUCTOR_P (current_function_decl)
+ && (cfndecl_name != finit_identifier_node))
error_with_decl (field_decl, "assignment to final field `%s' "
"not in constructor");
}
diff --git a/gcc/java/typeck.c b/gcc/java/typeck.c
index 213a389..c536efd 100644
--- a/gcc/java/typeck.c
+++ b/gcc/java/typeck.c
@@ -110,6 +110,9 @@ convert (type, expr)
{
register enum tree_code code = TREE_CODE (type);
+ if (!expr)
+ return error_mark_node;
+
if (do_not_fold)
return build1 (NOP_EXPR, type, expr);