build failure on mainline due to java/expr.c

Andrew Pinski pinskia@physics.uc.edu
Fri Jan 30 01:32:00 GMT 2004


On Jan 29, 2004, at 15:43, Ben Elliston wrote:

> Hi Andrew
>
> It seems that reverting this patch of yours corrects a build failure I
> am experiencing.  I didn't bother looking any closer at it.
>
> 2004-01-28  Andrew Haley  <aph@redhat.com>
>
> 	* expr.c (build_field_ref): Widen field offset.

The problem again is that compiling a cross compiler with an older 
version of gcc, 2.95.3
can cause an parse error as it does not support C99 of putting variable 
declaration anywhere.
I applied this patch as obvious.

Thanks,
Andrew Pinski

ChangeLog:
2004-01-28  Andrew Pinski  <pinskia@physics.uc.edu>

         * expr.c (build_field_ref): Move variable
         definition up.


Patch:
Index: expr.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/java/expr.c,v
retrieving revision 1.182
diff -u -p -r1.182 expr.c
--- expr.c	29 Jan 2004 13:19:26 -0000	1.182
+++ expr.c	30 Jan 2004 01:25:16 -0000
@@ -1523,8 +1523,9 @@ build_field_ref (tree self_value, tree s
  	  tree field_offset =
  	    build (ARRAY_REF, integer_type_node, TYPE_OTABLE_DECL 
(output_class),
  		   otable_index);
+	  tree address;
  	  field_offset = fold (convert (sizetype, field_offset));
-	  tree address
+	  address
  	    = fold (build (PLUS_EXPR,
  			   build_pointer_type (TREE_TYPE (field_decl)),
  			   self_value, field_offset));



More information about the Gcc-patches mailing list