On 23.01.2009 18:49, Saaa wrote:
The following code takes too long to compile (I kill link.exe to stop it)
dmd 2.023 bud -full - cleanup
--
module project.main;
import project.bug;
void main()
{
}
--
module project.bug;
struct Struct
{
uint number;
int[6] array;
byte[9] array2;
}
Struct structs[1_000_000];
--
Multiple variations on the struct seem to have the long compile time
effect.. allignment problem?
From http://www.digitalmars.com/d/1.0/arrays.html :
"The total size of a static array cannot exceed 16Mb. A dynamic array
should be used instead for such large arrays."
It's an optlink limitation, so it's not likely to get fixed either.