https://issues.dlang.org/show_bug.cgi?id=14859
Issue ID: 14859 Summary: static declared array with more than 16MB size should be allowed in struct and class declaration Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: enhancement Priority: P1 Component: dmd Assignee: nob...@puremagic.com Reporter: nightmarex1...@hotmail.com import std.stdio; struct Stuff { double someData, otherData; wchar[120] someFilePath; // byte[1024*1024*16] hugeArray; // Error: index 16777216 overflow for static array byte[1024*1024*8] hugeArrayPart_1; // dirty hack byte[1024*1024*8] hugeArrayPart_2; SomeOtherComplexStruct theComplexStruct; } int main(string[] argv) { Stuff* st = new Stuff(); writeln((*st).sizeof); readln(); return 0; } 16MB or more sized types should be allowed in order to make above code work without using dirty hacks "global static sized arrays" and "static sized arrays inside static class/struct" more than 16MB size should still not compile (or maybe a warning is better?) they just blow up output size and also heard optlink cause problems but don't know if it's relevant to above code. --