This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: build failure on mainline due to java/expr.c
- From: Andrew Pinski <pinskia at physics dot uc dot edu>
- To: Ben Elliston <bje at wasabisystems dot com>
- Cc: Gcc Patch List <gcc-patches at gcc dot gnu dot org>, java-patches at gcc dot gnu dot org, GCC List <gcc at gcc dot gnu dot org>, Andrew Haley <aph at redhat dot com>, Andrew Pinski <pinskia at physics dot uc dot edu>
- Date: Thu, 29 Jan 2004 17:29:30 -0800
- Subject: Re: build failure on mainline due to java/expr.c
- References: <877jzal3rz.fsf@wasabisystems.com>
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));