This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
PATCH for setting tree type resolving Java qlaifiers
- To: gcc-patches at gcc dot gnu dot org, java-patches at gcc dot gnu dot org
- Subject: PATCH for setting tree type resolving Java qlaifiers
- From: Per Bothner <per at bothner dot com>
- Date: 30 Aug 2001 13:28:46 -0700
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/