This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Java: Fix for PR 4695


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.




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]