Semicolon can be left out after do-while

Jonathan M Davis jmdavisProg at gmx.com
Tue Apr 12 19:30:21 PDT 2011


> Timon Gehr:
> > I just noticed a little oddity.
> 
> > Why does this code compile? The equivalent C code is rejected:
> I think Andrei wants (rightly) it to be fixed. So I think it is an
> implementation "bug" that will be fixed.

IIRC, TDPL says that the semicolon is required, even though it isn't, and when 
that was brought to Andrei's attention, he asked Walter to change it so that 
it is required like TDPL says. But as far as I know, nothing has happened. I 
don't recall Walter saying anything about it on the list either. So, I have no 
idea what the state of this is. I susupect that it was completely forgetten. 
An bug stating that this needs to be fixed to match TDPL is probably in order.

- Jonathan M Davis


More information about the Digitalmars-d-learn mailing list