This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: Need a little help with find_as_inner_class
- To: Mo DeJong <mdejong at cygnus dot com>
- Subject: Re: Need a little help with find_as_inner_class
- From: Alexandre Petit-Bianco <apbianco at cygnus dot com>
- Date: Mon, 7 May 2001 21:35:49 -0700 (PDT)
- Cc: java at gcc dot gnu dot org
- References: <Pine.SOL.3.91.1010506230913.18116D-100000@cse.cygnus.com>
- Reply-To: apbianco at cygnus dot com
Mo DeJong writes:
> In the case of "[ArrayBug.Inner" the first call to
> EXPR_WFL_QUALIFICATION() returns NULL
Yes, because it hasn't be set properly. The patch below fixes the
problem. I believe it also fixes java/2538, and I'm going to propose
it as a solution. Regardless, I tested the patch and it looks fine,
I'm going to check it in shortly, both in the trunk and the branch.
Thank you for the time you spent investigating.
./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.
Index: parse.y
===================================================================
RCS file: /cvs/gcc/gcc/gcc/java/parse.y,v
retrieving revision 1.251.2.21
diff -u -p -r1.251.2.21 parse.y
--- parse.y 2001/05/01 22:09:16 1.251.2.21
+++ parse.y 2001/05/08 02:52: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,12 @@ 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));
+ EXPR_WFL_QUALIFICATION (wfl) = EXPR_WFL_QUALIFICATION (type_or_wfl);
+ return wfl;
}
static void