OSDN Git Service

Thu Dec 16 00:09:45 1999 Alexandre Petit-Bianco <apbianco@cygnus.com>
authorapbianco <apbianco@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 31 Dec 1999 03:06:55 +0000 (03:06 +0000)
committerapbianco <apbianco@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 31 Dec 1999 03:06:55 +0000 (03:06 +0000)
* 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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@31147 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/java/ChangeLog
gcc/java/expr.c
gcc/java/typeck.c

index de49f42..b90c76b 100644 (file)
        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
        * 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
index d789efb..1b8d1a1 100644 (file)
@@ -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");
            }
index 213a389..c536efd 100644 (file)
@@ -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);