https://issues.dlang.org/show_bug.cgi?id=16224
--- Comment #7 from Andrei Alexandrescu <and...@erdani.com> --- (In reply to Johan Engelen from comment #6) > > The coverage analyzer marks the line with "while (0);" as uncovered, > > although that is an useless tidbit. > > I don't think it is useless. In the OP example, while(0) is uncovered > because there is never a "fallthrough exit" of that scope. Consider > something like this where coverage of while(0) is useful. > > int fun(int x) > { > do > { > if (x != 0) > break; > if (x != 1) > break; > if (x != -1) > break; > mightThrow(x); > } > while (0); > return x * x * x; > } In this case I agree coverage should be as usual. The presence of "return" changes things. --