[kaffe] KJC bug preventing Ant 1.6.0 bootstrap

Dalibor Topic robilad at kaffe.org
Sat Jan 3 03:11:02 PST 2004

Hi Ito, salut Guilhem,

I've tried to update kaffe-extras to 1.1.3 and ant 1.6.0, and after 
spending some time revisiting the ant bootstrap script, I failed due to 
what seems to be a compiler bug in kjc.

With the attached patched applied to kaffe-extras CVS HEAD and the file 
ant-kaffe-1.1.3.diff in patches/, I get:

bash-2.05a$ build.sh -Dbuild.compiler=kjc
... Bootstrapping Ant Distribution
... Compiling Ant Classes
src/main/org/apache/tools/ant/taskdefs/Execute.java:123: error:Catch 
block is unreachable [JLS 14.20]
... Failed compiling Ant classes !

With Execute.java :

    112      /**
    113       * Builds a command launcher for the OS and JVM we are 
running under
    114       */
    115      static {
    116          // Try using a JDK 1.3 launcher
    117          try {
    118              if (Os.isFamily("openvms")) {
    119                  vmLauncher = new VmsCommandLauncher();
    120              } else if (!Os.isFamily("os/2")) {
    121                  vmLauncher = new Java13CommandLauncher();
    122              }
    123          } catch (NoSuchMethodException exc) {
    124              // Ignore and keep trying
    125          }

and VmsCommandLauncher:

   1113      /**
   1114       * A command launcher for VMS that writes the command to a 
temporary DCL
   1115       * script before launching commands.  This is due to 
limitations of both
   1116       * the DCL interpreter and the Java VM implementation.
   1117       */
   1118      private static class VmsCommandLauncher extends 
Java13CommandLauncher {
   1120          public VmsCommandLauncher() throws NoSuchMethodException {
   1121              super();
   1122          }

so it can actually throw NoSuchMethodException.

Since I'm not as familiar with kjc sources as you guys are, it would be 
nice if you could give some clues on how to go about fixing this bug.

It's sad that apparently the kjc developers prefer to be silent when 
they receive bug reports, so I guess the burden on maintaining kjc in a 
useable shape falls on kaffe developers.

dalibor topic
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: kaffe.diff
Url: http://kaffe.org/pipermail/kaffe/attachments/20040103/fcb3cfae/attachment-0004.txt 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: ant-kaffe-1.1.3.diff
Url: http://kaffe.org/pipermail/kaffe/attachments/20040103/fcb3cfae/attachment-0005.txt 

More information about the kaffe mailing list