www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 4374] New: Required do-while ending semicolon

reply d-bugmail puremagic.com writes:
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 puremagic.com
        ReportedBy: bearophile_hugs eml.cc


--- Comment #0 from bearophile_hugs 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: -------
Jun 23 2010
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=4374


Walter Bright <bugzilla digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bugzilla digitalmars.com
           Severity|normal                      |enhancement


-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Sep 09 2011
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=4374


timon.gehr gmx.ch changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


--- Comment #2 from timon.gehr gmx.ch 2011-11-09 00:09:42 PST ---
https://github.com/D-Programming-Language/dmd/commit/1db16352e0d6457c3da6b8bfb1ceb242bdf24950

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