This is the mail archive of the gcc-prs@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]
Other format: [Raw text]

Re: java/7066: gcj generates invalid bytecode for inner classes


The following reply was made to PR java/7066; it has been noted by GNATS.

From: Bruno Haible <bruno@clisp.org>
To: tromey@redhat.com
Cc: gcc-gnats@gcc.gnu.org
Subject: Re: java/7066: gcj generates invalid bytecode for inner classes
Date: Tue, 18 Jun 2002 18:23:56 +0200 (CEST)

 Tom Tromey writes:
 
 > This means you didn't configure with --enable-threads, but your
 > program uses threads.
 
 I see. Thanks.
 
 > Bruno> $ java -version
 > Bruno> java version "1.3.1_02"
 > 
 > This is part of the problem...
 > 
 > Bruno> Method GetURL$1(GetURL)
 > Bruno>    0 aload_0
 > Bruno>    1 aload_1
 > Bruno>    2 putfield #12 <Field GetURL this$0>
 > Bruno>    5 aload_0
 > Bruno>    6 invokespecial #15 <Method java.lang.Thread()>
 > Bruno>    9 return
 > 
 > This is valid bytecode according to the 1.4 spec.  The 1.3 JDK doesn't
 > like it though; they added a special exception to the verifier to let
 > code like this through.  If you use the 1.4 "javac" you'll also see
 > this.
 
 Thanks for the explanation. Is there a command line option for gcj to
 produce Java 1.1 compliant class files? I mean, without such an
 option, "gcj -C" is useless for me. I wanted to bytecompile Java
 sources to jars and distribute them as jar files, to be executed by
 any JDK 1.1 compliant JVM.
 
 Bruno


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