This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: New Miscompilation Into Bytecode Error


>>>>> "Ranjit" == Ranjit Mathew <rmathew@gmail.com> writes:

Ranjit> For this testcase, the JDK creates the following class files:
Ranjit>   Hello.class
Ranjit>   Hello$1.class
Ranjit>   Hello$1Local.class
Ranjit> while GCJ creates:
Ranjit>   Hello.class
Ranjit>   Hello$1$Local.class
Ranjit>   Hello$Local$2.class
Ranjit> Is this divergence intentional and/or OK?

It is ok.  The names of local and anonymous classes are not fixed (or
afaik described) by any standard.  The only way to refer to such
classes outside their compilation unit is via reflection -- but if you
are doing this then there is something pretty wrong IMO.  We diverge
from what Sun does here simply because it was easier to implement our
own approach than it was to reverse engineer what they do.

Tom


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