This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Java: minor field lookup patch.
- To: gcc-patches at gcc dot gnu dot org
- Subject: [PATCH] Java: minor field lookup patch.
- From: Alexandre Petit-Bianco <apbianco at cygnus dot com>
- Date: Thu, 29 Jun 2000 14:10:12 -0700
- Reply-to: apbianco at redhat dot com
This patch fixes a minor problem with the code checking for ambiguous
field declarations. I just checked it in.
./A
2000-06-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
* expr.c (lookup_field): The same field can be found through two
different interface. Don't declare it ambiguous in that case.
Index: expr.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/java/expr.c,v
retrieving revision 1.78
diff -u -p -r1.78 expr.c
--- expr.c 2000/06/25 17:30:38 1.78
+++ expr.c 2000/06/29 21:07:59
@@ -1361,6 +1361,8 @@ lookup_field (typep, name)
tree t = BINFO_TYPE (TREE_VEC_ELT (basetype_vec, i));
if ((field = lookup_field (&t, name)))
{
+ if (save_field == field)
+ continue;
if (save_field == NULL_TREE)
save_field = field;
else