セミコロンのあるなしで挙動が変わるプログラム

例えばこんな感じ。

public final class Main {
    static int count = 0;
    
    static boolean m1() { System.out.println("m1"); return false; }
    static boolean m2() { System.out.println("m2"); return count++ != 1; }
    static void reset() { System.out.println(); count = 0; }
    
    public static void main(String[] args) {
        do ; while (m1()); while (m2());
        reset();
        do   while (m1()); while (m2());
    }
}

コードは Java だけど、do-while がある言語なら大体同じようなことは出来るはず。
えーと、何が言いたいかって言うと、do-while の本体が空なら while 使え、ってこと。

do while (hogehoge());

while (piyopiyo());

こんなコードは書いちゃ駄目。