[kaffe] kaffe: different compilers giving different results for the same source file
ito.kazumitsu at mail.hidec.co.jp
Wed Aug 4 00:21:44 PDT 2004
In message "[kaffe] kaffe: different compilers giving different results for the same source file"
on 04/08/03, Rogério Brito <rbrito at ime.usp.br> writes:
> Anyway, I have one source file that *fails* to compile with Blackdown's
> JDK, but that compiles *correctly* with kaffe's compiler. Some (unkind)
> souls told me that kaffe's compiler is in error here and I honestly don't
I think KJC, Kaffe's compiler is wrong.
The problem is that KJC accepts the expression "super" alone
while the language specification allows the expression "super"
only in the combination "super.Identifier".
The language specification says:
Suppose that a field access expression super.name appears within class C,
and the immediate superclass of C is class S. Then super.name is treated
exactly as if it had been the expression ((S)this).name; thus, it refers
to the field named name of the current object, but with the current object
viewed as an instance of the superclass.
So the expression "super" alone may mean ((S)this) although not allowed
by the language specification.
I think this is KJC's bug. But can't we lazily accept this as a language
extension by KJC?
More information about the kaffe