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 PR java/2066 and java/2400.



This patch fixes java/2066 and java/2400 and doesn't trigger
regressions on my side. I'm committing this to both the trunk and the
branch.

./A

Index: ChangeLog
===================================================================
RCS file: /cvs/gcc/gcc/gcc/java/ChangeLog,v
retrieving revision 1.647.2.31
diff -u -p -r1.647.2.31 ChangeLog
--- ChangeLog	2001/03/27 04:41:19	1.647.2.31
+++ ChangeLog	2001/03/28 19:03:12
@@ -1,3 +1,9 @@
+2001-03-21  Alexandre Petit-Bianco  <apbianco@redhat.com>
+
+        * parse.y (qualify_ambiguous_name): Broaden `length'
+        recognition. Help MODIFY_EXPR be resolved as expression names.
+	Fixes PR java/2066. Fixes PR java/2400.
+
 2001-03-26  Mark Mitchell  <mark@codesourcery.com>
 
 	* parse.h (DECL_END_SOURCE_LINE): Don't rely on DECL_FRAME_SIZE.
Index: parse.y
===================================================================
RCS file: /cvs/gcc/gcc/gcc/java/parse.y,v
retrieving revision 1.251.2.11
diff -u -p -r1.251.2.11 parse.y
--- parse.y	2001/03/26 22:12:03	1.251.2.11
+++ parse.y	2001/03/28 19:03:49
@@ -10918,7 +10918,7 @@ qualify_ambiguous_name (id)
      expression name. If we saw a NEW_ARRAY_EXPR before and want to
      address length, it is OK. */
   else if ((decl = lookup_field_wrapper (ptr_type, name))
-	   || (new_array_found && name == length_identifier_node))
+	   || name == length_identifier_node)
     {
       RESOLVE_EXPRESSION_NAME_P (qual_wfl) = 1;
       QUAL_RESOLUTION (qual) = (new_array_found ? NULL_TREE : decl);
@@ -10943,7 +10943,8 @@ qualify_ambiguous_name (id)
   /* Method call, array references and cast are expression name */
   else if (TREE_CODE (QUAL_WFL (qual)) == CALL_EXPR
 	   || TREE_CODE (QUAL_WFL (qual)) == ARRAY_REF
-	   || TREE_CODE (QUAL_WFL (qual)) == CONVERT_EXPR)
+	   || TREE_CODE (QUAL_WFL (qual)) == CONVERT_EXPR
+	   || TREE_CODE (QUAL_WFL (qual)) == MODIFY_EXPR)
     RESOLVE_EXPRESSION_NAME_P (qual_wfl) = 1;
 
   /* Check here that NAME isn't declared by more than one


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