Patrick Tullmann wrote:
> I sent this in to the KOPI folks, but I haven't heard a peep from
> them.
They work on GNU Kopi 1.5. Yes, it's now part of GNU Project !
> As an FYI to other Kaffer's, I present the do-while bug in kjc.
> I haven't tried upgrading to the latest KJC.
kjc-1.4C have the same bug :(
It's trivial patch in kjc/JDoStatement.java (attached). I also attach
compiled class at/dms/kjc/JDoStatement.class for kjc-1.4B (version used
Kaffe CVS tree), let me now if you use another version of kjc.
--
Edouard G. Parmelan
http://egp.free.fr
--- kjc/JDoStatement.java.orig Mon Dec 13 14:11:58 1999
+++ kjc/JDoStatement.java Fri Feb 11 11:24:28 2000
@@ -110,12 +110,14 @@
*/
public void genCode(CodeSequence code) {
code.setLineNumber(getTokenReference().getLine());
+ CodeLabel begin = new CodeLabel();
code.pushContext(this);
- code.plantLabel(getContinue()); // cont:
+ code.plantLabel(begin); // begin:
body.genCode(code); // BODY CODE
- cond.genBranch(true, code, getContinue()); // EXPR
+ code.plantLabel(getContinue()); // cont:
+ cond.genBranch(true, code, begin); // EXPR
code.plantLabel(getEnd()); // end: ...
code.popContext(this);
JDoStatement.class