gcj/283: GCJ fails to compile inner classes which extend another inner class

Alexandre Petit-Bianco apbianco@cygnus.com
Tue Oct 24 10:16:00 GMT 2000


The following reply was made to PR gcj/283; it has been noted by GNATS.

From: Alexandre Petit-Bianco <apbianco@cygnus.com>
To: Mark Wielaard <mark@klomp.org>, idstewart@softhome.net
Cc: java-gnats@sourceware.cygnus.com
Subject: Re: gcj/283: GCJ fails to compile inner classes which extend another inner class
Date: Tue, 24 Oct 2000 10:09:24 -0700 (PDT)

 Mark Wielaard writes:
 
 >  Which is wrong since OuterB is in scope and is an instance of OuterA.
 
 Yes. Here's a patch.
 
 >  Note that as Bryce noted you want to make sure that you don't have
 >  any class files around since that gives yet another obscure error
 >  message.
 
 It might have been a temporary glitch. I wasn't able to reproduce the
 problem.
 
 ./A
 
 2000-10-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
 
 	* parse.h (INNER_ENCLOSING_SCOPE_CHECK): Check inherited type in
 	scope. Fixes gcj/283.
 
 Index: parse.h
 ===================================================================
 RCS file: /cvs/gcc/egcs/gcc/java/parse.h,v
 retrieving revision 1.61
 diff -u -p -r1.61 parse.h
 --- parse.h	2000/10/21 15:10:38	1.61
 +++ parse.h	2000/10/24 16:53:10
 @@ -861,6 +861,11 @@ struct parser_ctxt {
  			     TREE_TYPE (DECL_CONTEXT (TYPE_NAME (T))))	      \
          && !common_enclosing_context_p (TREE_TYPE (TREE_TYPE (current_this)), \
  					(T)))				      \
 +        && INNER_CLASS_TYPE_P (TREE_TYPE (TREE_TYPE (current_this)))	      \
 +        && !inherits_from_p 						      \
 +              (TREE_TYPE (DECL_CONTEXT 					      \
 +			  (TYPE_NAME (TREE_TYPE (TREE_TYPE (current_this))))),\
 +	       TREE_TYPE (DECL_CONTEXT (TYPE_NAME (T))))		      \
         /* We don't have a this. */					      \
         || !current_this))
  


More information about the Java-prs mailing list