This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: Java: Fix for PR 4695
- To: apbianco at cygnus dot com
- Subject: Re: Java: Fix for PR 4695
- From: Bryce McKinlay <bryce at waitaki dot otago dot ac dot nz>
- Date: Wed, 07 Nov 2001 14:19:29 +1300
- CC: gcc-patches at gcc dot gnu dot org, java-patches at gcc dot gnu dot org
- References: <3BE2489C.3050901@waitaki.otago.ac.nz> <opk7x41zid.fsf@fencer.cygnus.com> <3BE7550D.7060002@waitaki.otago.ac.nz> <15336.24117.846895.562925@fencer.cygnus.com>
Alexandre Petit-Bianco wrote:
>Bryce McKinlay writes:
>
>>So, this is a different bug, which happens to be revealed by my patch ;-)
>>
>
>How about adding this hunk to your patch? This corrected the regression.
>
Well, this doesn't catch the case of trying to access the enclosing
instance from the anonymous class, which is illegal. I thought that we
could just make such classes static, which is what jikes does, but javac
doesn't do this. Also the latest jikes has this in its changelog:
- never set ACC_STATIC bit on local classes
- make sure private methods and anonymous classes are always
final, and anonymous classes are never static.
So, I think we need a way to treat them as static but not actually set the ACC_STATIC for the emitted class.
regards
Bryce.