This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

[PATCH] Java: fix to this week build failures.



The patch below fixes the libjava build failures encountered by many
early this week:

  http://gcc.gnu.org/ml/gcc/2001-10/msg00043.html
  http://gcc.gnu.org/ml/gcc-bugs/2001-10/msg00048.html

I'm checking this in.

./A

2001-10-03  Alexandre Petit-Bianco  <apbianco@redhat.com>

	* parse.y (patch_assignment): Use lvalue's original TYPE when
	building the final COMPOUND_EXPR.
	(try_reference_assignconv): Fixed leading comment.

Index: parse.y
===================================================================
RCS file: /cvs/gcc/gcc/gcc/java/parse.y,v
retrieving revision 1.315
diff -u -p -r1.315 parse.y
--- parse.y	2001/09/27 19:20:12	1.315
+++ parse.y	2001/10/04 02:50:09
@@ -13002,10 +13002,11 @@ patch_assignment (node, wfl_op1, wfl_op2
             build (COMPOUND_EXPR, void_type_node, bound_check, check);
 
           /* Re-assemble the augmented array access. */
-          lvalue = build (COMPOUND_EXPR, lhs_type, new_compound, lvalue);
+          lvalue = build (COMPOUND_EXPR, TREE_TYPE (lvalue),
+			  new_compound, lvalue);
         }
       else
-        lvalue = build (COMPOUND_EXPR, lhs_type, check, lvalue);
+        lvalue = build (COMPOUND_EXPR, TREE_TYPE (lvalue), check, lvalue);
     }
 
   /* Final locals can be used as case values in switch
@@ -13028,9 +13029,8 @@ patch_assignment (node, wfl_op1, wfl_op2
 }
 
 /* Check that type SOURCE can be cast into type DEST. If the cast
-   can't occur at all, return 0 otherwise 1. This function is used to
-   produce accurate error messages on the reasons why an assignment
-   failed. */
+   can't occur at all, return NULL; otherwise, return a possibly
+   modified rhs.  */
 
 static tree
 try_reference_assignconv (lhs_type, rhs)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]