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

           Summary: One infinite loop with foreach
           Product: D
           Version: D2
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Keywords: diagnostic
          Severity: enhancement
          Priority: P2
         Component: DMD
        AssignedTo: [email protected]
        ReportedBy: [email protected]


--- Comment #0 from [email protected] 2012-11-05 19:06:10 PST ---
With DMD 2.061alpha this code compiles with no errors or warnings, and it goes
in infinite loop at run-time:


void main() {
    int[256] arr;
    foreach (ubyte i, x; arr) {}
}


Is it a good idea to add a compile-time test in the D compiler to statically
forbid such code? Or maybe just a warning?

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

Reply via email to