[Issue 4374] New: Required do-while ending semicolon

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Jun 23 04:42:35 PDT 2010


http://d.puremagic.com/issues/show_bug.cgi?id=4374

           Summary: Required do-while ending semicolon
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: accepts-invalid
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: bearophile_hugs at eml.cc


--- Comment #0 from bearophile_hugs at eml.cc 2010-06-23 04:42:34 PDT ---
This code compiles with v2.047, but the do-while misses the ending semicolon:

void main() {
    do {
    } while (false)
}


Turning this kind of code into a syntax error makes this syntax more consistent
with the other parts of D syntax and can reduce programmer's confusion (because
the semicolon clearly denotes the end of something instead of a possible start
of a new while loop).
I prefer a language that doesn't need ending semicolons, but in D2 requiring a
semicolon there is better.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list