This is the mail archive of the
java-prs@sources.redhat.com
mailing list for the Java project.
Re: gcj/257 (workaround)
- To: apbianco at cygnus dot com
- Subject: Re: gcj/257 (workaround)
- From: Alexandre Petit-Bianco <apbianco at cygnus dot com>
- Date: 22 Jul 2000 05:50:00 -0000
- Cc: java-prs at sourceware dot cygnus dot com,
- Reply-To: Alexandre Petit-Bianco <apbianco at cygnus dot com>
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