This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Patch: PR java/5368
- From: Mark Wielaard <mark at klomp dot org>
- To: gcc-patches at gcc dot gnu dot org
- Cc: java-patches at gcc dot gnu dot org
- Date: 23 Mar 2002 23:59:28 +0100
- Subject: 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;
}