www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 13031] New: `continue` with label causes compiler to think


          Issue ID: 13031
           Summary: `continue` with label causes compiler to think code
                    after loop can be executed
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P1
         Component: DMD
          Assignee: nobody puremagic.com
          Reporter: verylonglogin.reg gmail.com

This code should compile:
int f(int a)
L:  for(;;)
            continue L;
        return 0;
main.d(1): Error: function main.f no return exp; or assert(0); at end of

Jul 03 2014