This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


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

gcc java bug


gcc --version
2.96
(RedHat 7.0 Public Beta)

gcc java does not understand
static variables in inner class.
gcj Y.java Y2.java -o x --main=Y2
Y2.java: In class `Y2':
Y2.java: In method `main(java.lang.String[])':
Y2.java:4: No variable `UU' defined in type `Y'.
  System.err.println(Y.UU.V);
                      ^
1 error



 cat Y2.java
class Y2 {
 public static void main(String [] args)
 {
  System.err.println(Y.UU.V);
 }
}


cat Y.java
public class Y {
public static class UU {
 public static final String V="V";
}
public static void main(String [] args)
{
 System.err.println(Y.UU.V);
}
}




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