This is the mail archive of the java@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]

Re: GCJ 3.2 for Win32: Updated Snapshot


On 12 Dec 2002, Tom Tromey wrote:
> Jeff> That is what -fno-assume-compiled was for, as I understand it.
> Jeff> However it doesn't work at this time.
>
> I think it never worked.

I looked at the code.  I think it can be useful; see the example below.
Would you be interested in patches to make it work?

[jsturm@suzy tmp]$ cat Foo.java
public class Foo extends Bar {
  public Foo() {
    System.out.println("Foo");
  }
  public static void main(String[] args) {
    new Foo();
  }
}

[jsturm@suzy tmp]$ cat Bar.java
public class Bar {
  public Bar() {
    System.out.println("Bar");
  }
}

[jsturm@suzy tmp]$ gcj Foo.java --main=Foo -o foo
/tmp/ccCkQTOS.o(.text+0x1a): In function `Foo::Foo[in-charge]()':
: undefined reference to `Bar::Bar[in-charge]()'
/tmp/ccCkQTOS.o(.data+0x90): undefined reference to `Bar::class$'
collect2: ld returned 1 exit status

[jsturm@suzy tmp]$ gcj Foo.java -fno-assume-compiled --main=Foo -o foo
[jsturm@suzy tmp]$ ./foo
Exception in thread "main" java.lang.ClassNotFoundException: Bar

[jsturm@suzy tmp]$ gcj -C Bar.java
[jsturm@suzy tmp]$ ./foo
Bar
Foo


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