New Miscompilation Into Bytecode Error
Tom Tromey
tromey@redhat.com
Thu Jul 1 15:46:00 GMT 2004
>>>>> "Ranjit" == Ranjit Mathew <rmathew@gmail.com> writes:
Ranjit> For this testcase, the JDK creates the following class files:
Ranjit> Hello.class
Ranjit> Hello1ドル.class
Ranjit> Hello1ドルLocal.class
Ranjit> while GCJ creates:
Ranjit> Hello.class
Ranjit> Hello1ドル$Local.class
Ranjit> Hello$Local2ドル.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
More information about the Java
mailing list