gcj/257 (workaround)
Alexandre Petit-Bianco
apbianco@cygnus.com
Fri Jul 21 22:50:00 GMT 2000
The following reply was made to PR gcj/257; it has been noted by GNATS.
From: Alexandre Petit-Bianco <apbianco@cygnus.com>
To: java-gnats@sourceware.cygnus.com
Cc:
Subject: Re: gcj/257 (workaround)
Date: Fri, 21 Jul 2000 22:44:40 -0700 (PDT)
Mark Wielaard writes:
> As a workaround you can cast to (B$C) which is accepted by gcj.
> (But not by jikes and it seems wrong that gcj accepts it.)
It is, because `$' isn't a qualified expression separator. Jikes is
right to reject it and most likely accepts something like:
class A$B {}
class C { A$B x = null;}
Compilers of some versions of the JDK accept it interesting ways:
jdk117 accepts the following:
class a$b {}
class z {
Z$C x = null;
a$b y = null;
}
class Z {class C {}}
I.e. will accept a class called a$b and will take the liberty to
interpret Z$C as a qualified expression to point at inner class C.
In the light of these facts, I'm going to amend my patch to 257.
./A
More information about the Java-prs
mailing list