[PATCH] Fixing mauve builds, java/2361.

Alexandre Petit-Bianco apbianco@cygnus.com
Thu Apr 5 12:41:00 GMT 2001


This patch fixes a mauve build problem reported as java/2361. I'm
checking this in the branch and the trunk.

./A

2001-04-04  Alexandre Petit-Bianco  <apbianco@redhat.com>

	* parse.y (resolve_qualified_expression_name): Pass field's
	DECL_CONTEXT to `not_accessible_p.'
	(not_accessible_p): Changed parameters order in `inherits_from_p'
	invokation.

Index: parse.y
===================================================================
RCS file: /cvs/gcc/gcc/gcc/java/parse.y,v
retrieving revision 1.251.2.13
diff -u -p -r1.251.2.13 parse.y
--- parse.y	2001/04/04 19:50:43	1.251.2.13
+++ parse.y	2001/04/05 02:36:25
@@ -9449,7 +9449,7 @@ resolve_qualified_expression_name (wfl, 
 	      
 	      /* Check on accessibility here */
 	      if (not_accessible_p (current_class, field_decl,
-				    TREE_TYPE (decl), from_super))
+				    DECL_CONTEXT (field_decl), from_super))
 		{
 		  parse_error_context 
 		    (qual_wfl,
@@ -9574,7 +9574,7 @@ not_accessible_p (reference, member, whe
       /* If where is active, access was made through a
 	 qualifier. Access is granted if the type of the qualifier is
 	 or is a sublass of the type the access made from (6.6.2.1.)  */
-      if (where && !inherits_from_p (where, reference))
+      if (where && !inherits_from_p (reference, where))
 	return 1;
 
       /* Otherwise, access is granted if occuring from the class where



More information about the Java-patches mailing list