This is the mail archive of the java-patches@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]

Patch: PR java/5368


Hi,

This patch fixes PR 5368.

When generating the error message the code needs to look at decl
not field_decl which is still a NULL_TREE at that point.

ChangeLog entry:

  Fix for PR java/5368:
  * parse.y (resolve_qualified_expression_name): Use decl not field_decl
  when printing error message.

OK to commit to trunk/branch?

Cheers,

Mark
Index: gcc/java/parse.y
===================================================================
RCS file: /cvs/gcc/gcc/gcc/java/parse.y,v
retrieving revision 1.353.2.8
diff -u -r1.353.2.8 parse.y
--- parse.y	2002/03/21 18:56:58	1.353.2.8
+++ parse.y	2002/03/23 22:56:59
@@ -9804,7 +9804,7 @@
 		    (qual_wfl, "Attempt to reference field `%s' in `%s %s'",
 		     IDENTIFIER_POINTER (EXPR_WFL_NODE (qual_wfl)),
 		     lang_printable_name (type, 0),
-		     IDENTIFIER_POINTER (DECL_NAME (field_decl)));
+		     IDENTIFIER_POINTER (DECL_NAME (decl)));
 		  return 1;
 		}
 	      

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