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: minor field lookup patch.


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

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