This is the mail archive of the java-prs@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug java/17691] New: error on valid java code from freenet


>cat a.java

class A {
int x (){
return 0;
}
}
class B extends A {
int y(){
B.super.x();
return 0;
}
}

>javac a.java
#no error

>gcj a.java
a.java:8: error: '(' expected.
   B.super.x();
          ^
1 error

I know it is not good to use another compiler to check for validity of code.
Nevertheless, I looked this up and it is valid code according to Sun.
I can't find the reference now.
The super in this example is redundant, but it wouldn't be if B had an x() method.

The errors are the same in either case.

This is needed to compile freenet/crypt/ThrottledAsyncEntropyYarrow.java

Please check

-- 
           Summary: error on valid java code from freenet
           Product: gcc
           Version: 3.4.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: java
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: ruben at ugr dot es
                CC: gcc-bugs at gcc dot gnu dot org,java-prs at gcc dot gnu
                    dot org
 GCC build triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17691


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