gcj/271: .java files are not compiled on demand (alt. unclear error)
osk@hem.passagen.se
osk@hem.passagen.se
Sat Jul 1 12:40:00 GMT 2000
>Number: 271
>Category: gcj
>Synopsis: .java files are not compiled on demand (alt. unclear error)
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: apbianco
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sat Jul 01 12:40:00 PDT 2000
>Closed-Date:
>Last-Modified:
>Originator: Oskar Liljeblad
>Release: unknown-1.0
>Organization:
>Environment:
Debian GNU/Linux
GNU libc 2.1.3
gcc 2.96 snapshot 20000612
libgcj snapshot 2000-06-18
>Description:
Save the three attached source files and make sure the classes
haven't been compiled to .class or .o. Compilation in this order
gives:
$ gcj -c Super.java
$ gcj -C Test.java
$ gcj -c Test.class
Test.java:3: unexpected type on stack
This is caused by the fact that no UncompiledSub.class/.o
is available. I think that the error message printed should
indicate that the "unexpected type" is actually
UncompiledSub. (It took me some time to figure out what was
wrong here. A better error message would have helped.)
As an alternative, the UncompiledSub.java file could be automaticly
compiled when compiling Test.class.
Super.java:
public class Super { }
UncompiledSub.java:
public class UncompiledSub extends Super { }
Test.java:
public class Test {
public void doSomething(Super o) {
if (o instanceof UncompiledSub) {
System.out.println("Do something different");
}
}
}
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the Java-prs
mailing list