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 for setting tree type resolving Java qlaifiers


I don't remember how I found this bug, but it does seem like the
Right Thing.  Without it, the result of the COMPOUND_EXPR get set
from type, which is computed using GET_SKIP_TYPE, which means a
pointer-to-record type becomes a record type.  Of course there
are no expressions of pointer type in Java.

Alex, do you agree?

2001-08-30  Per Bothner  <per@bothner.com>

	* parse.y (resolve_qualified_expression_name):  If creating a
	COMPOUND_EXPR, set it's type correctly.

Index: parse.y
===================================================================
RCS file: /cvs/gcc/gcc/gcc/java/parse.y,v
retrieving revision 1.304
diff -u -r1.304 parse.y
--- parse.y	2001/08/29 02:22:52	1.304
+++ parse.y	2001/08/30 19:45:08
@@ -9418,7 +9418,8 @@
 	     forcoming function's argument. */
 	  if (previous_call_static && is_static)
 	    {
-	      decl = build (COMPOUND_EXPR, type, decl, *where_found);
+	      decl = build (COMPOUND_EXPR, TREE_TYPE (*where_found),
+			    decl, *where_found);
 	      TREE_SIDE_EFFECTS (decl) = 1;
 	    }
 	  else

-- 
	--Per Bothner
per@bothner.com   http://www.bothner.com/per/


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