[kaffe] Re: error:Switch label must be constant [JLS 14.10]

Ito Kazumitsu ito.kazumitsu at hitachi-cable.co.jp
Tue Oct 28 18:41:01 PST 2003


I heard from Laurent and Guilhem that my error did not
occur with the latest kaffe.

Now I have found how to reproduce the error.  How 'Trigger*.java' is
expanded may depond on the environment,  but the order of souce files
on the command line is important.

bash$ java at.dms.kjc.Main TriggerDef.java Trigger.java

No problem.

bash$ java at.dms.kjc.Main Trigger.java TriggerDef.java
TriggerDef.java:10: error:Switch label must be constant [JLS 14.10]
TriggerDef.java:4: error:Method "indexToRight" must return a value [JLS 8.4.5]

It seems that when Trigger.java is being processed, the compiler
does not know much about TriggerDef.java and TriggerDef.NUM_TRIGGER_OPS
cannot be treated as a constant.

More information about the kaffe mailing list