This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Fixes for java/2538 and java/2535.
- To: gcc-patches at gcc dot gnu dot org, java-patches at gcc dot gnu dot org
- Subject: [PATCH] Fixes for java/2538 and java/2535.
- From: Alexandre Petit-Bianco <apbianco at cygnus dot com>
- Date: Tue, 8 May 2001 01:04:25 -0700
- Reply-to: apbianco at cygnus dot com
This patch fixes a problem recently reported on the Java mailing list
and less recently in two Java PRs:
http://gcc.gnu.org/ml/java/2001-05/msg00077.html
http://gcc.gnu.org/ml/java-prs/2001-q2/msg00008.html
http://gcc.gnu.org/ml/gcc-bugs/2001-04/msg00255.html
I'm going to check this in the trunk and the 3.0 branch.
./A
2001-05-07 Alexandre Petit-Bianco <apbianco@redhat.com>
* parse.y (build_unresolved_array_type): Set
EXPR_WFL_QUALIFICATION on the newly created wfl.
Fixes PR java/2538. Fixes PR java/2535.
Index: parse.y
===================================================================
RCS file: /cvs/gcc/gcc/gcc/java/parse.y,v
retrieving revision 1.251.2.22
diff -u -p -r1.251.2.22 parse.y
--- parse.y 2001/05/07 19:48:53 1.251.2.22
+++ parse.y 2001/05/08 07:51:48
@@ -3305,6 +3305,7 @@ build_unresolved_array_type (type_or_wfl
tree type_or_wfl;
{
const char *ptr;
+ tree wfl;
/* TYPE_OR_WFL might be an array on a resolved type. In this case,
just create a array type */
@@ -3316,10 +3317,14 @@ build_unresolved_array_type (type_or_wfl
IDENTIFIER_POINTER (EXPR_WFL_NODE (type_or_wfl)),
IDENTIFIER_LENGTH (EXPR_WFL_NODE (type_or_wfl)));
ptr = obstack_finish (&temporary_obstack);
- return build_expr_wfl (get_identifier (ptr),
- EXPR_WFL_FILENAME (type_or_wfl),
- EXPR_WFL_LINENO (type_or_wfl),
- EXPR_WFL_COLNO (type_or_wfl));
+ wfl = build_expr_wfl (get_identifier (ptr),
+ EXPR_WFL_FILENAME (type_or_wfl),
+ EXPR_WFL_LINENO (type_or_wfl),
+ EXPR_WFL_COLNO (type_or_wfl));
+ /* Re-install the existing qualifications so that the type can be
+ resolved properly. */
+ EXPR_WFL_QUALIFICATION (wfl) = EXPR_WFL_QUALIFICATION (type_or_wfl);
+ return wfl;
}
static void