This is the mail archive of the
java-prs@sourceware.cygnus.com
mailing list for the Java project.
gcj/271: .java files are not compiled on demand (alt. unclear error)
- To: java-gnats at sourceware dot cygnus dot com
- Subject: gcj/271: .java files are not compiled on demand (alt. unclear error)
- From: osk at hem dot passagen dot se
- Date: 1 Jul 2000 19:32:31 -0000
- Reply-To: osk at hem dot passagen dot se
- Resent-Cc: java-prs at sourceware dot cygnus dot com, green at cygnus dot com
- Resent-Reply-To: java-gnats@sourceware.cygnus.com, osk@hem.passagen.se
>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: