What    |Removed                     |Added
                 CC|                            |[EMAIL PROTECTED]

------- Comment #5 from [EMAIL PROTECTED]  2008-11-19 18:38 -------
(In reply to comment #3)
> Erm, actually, I wonder if this is even valid.  do-while loops in D do not
> require a semicolon at the end.  The "unreachable statement" is simply the
> empty statement that follows the "while(true)".  The following code:

It's valid, it just throws a warning.  ISTM not having the semicolon at the end
of DoStatement was a bad design decision - if you stumble upon

    while (whatever)

in the middle of some code, you have to look through possibly screenfuls of
code to determine whether the while applies to the preceding block (and the
following one just opens a new scope for whatever reason) or the following

Meanwhile, the conditions under which "statement is not reachable" is thrown
ought to be changed to exclude empty statements.


Reply via email to