This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Tree check failures when compiling Classpath


Hi,

While compiling a recent Classpath with a current gcj (gcc version 3.1
20020312 (prerelease)) I get tree check failures like:

./../java/security/Identity.java:207: tree check: expected class 't',
have 'e' (expr_with_file_location) in unresolved_type_p, at
java/parse.y:5028

Something like the following makes the compile get further along but
this is way over my head. 

--- parse.y	2002/03/12 18:07:32	1.353.2.5
+++ parse.y	2002/03/13 01:30:53
@@ -5025,10 +5025,18 @@
       if (returned)
 	{
 	  tree decl = IDENTIFIER_CLASS_VALUE (EXPR_WFL_NODE (wfl));
-	  if (decl && current_class && (decl == TYPE_NAME (current_class)))
+	  tree cc = current_class;
+	  if (cc && TREE_CODE (cc) == EXPR_WITH_FILE_LOCATION)
+	    cc = EXPR_WFL_NODE (cc);
+	  if (decl && cc && (decl == TYPE_NAME (current_class)))
 	    *returned = TREE_TYPE (decl);
 	  else if (GET_CPC_UN () == EXPR_WFL_NODE (wfl))
-	    *returned = TREE_TYPE (GET_CPC ());
+	  {
+	    if (TREE_CODE (GET_CPC ()) != EXPR_WITH_FILE_LOCATION)
+	      *returned = TREE_TYPE (GET_CPC ());
+	    else
+	      *returned = NULL_TREE;
+	  }
 	  else
 	    *returned = NULL_TREE;
 	}

Is there something really wrong when either current_class or GET_CPC() are
an expr_with_file_location? Should unresolved_type_p return a NULL_TREE
or unwrap the actual tree node? Why doesn't the unresolved_type_p function
have any documentation?

I am getting some sleep now :)

Cheers,

Mark


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