http://d.puremagic.com/issues/show_bug.cgi?id=5997
Summary: Static arrays with 0 length accepted by compiler Product: D Version: unspecified Platform: Other OS/Version: Windows Status: NEW Keywords: accepts-invalid Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: andrej.mitrov...@gmail.com --- Comment #0 from Andrej Mitrovic <andrej.mitrov...@gmail.com> 2011-05-13 19:25:14 PDT --- Is there a use case for 0-length static arrays? If there's not a use-case, then this should probably be a compiler error: int[0] logs; // <- disallow this void main() { logs = [4]; } The assignment statement causes a linker error (if you comment it out you won't get any linker errors): /+ test.obj(test) Offset 002DFH Record Type 009D Error 16: Index Range --- errorlevel 1 +/ -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------