www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - big array index crashes dmd .121

reply zwang <nehzgnaw gmail.com> writes:
void main(){
static char a[1] = [int.max:0];
}

------
//a variant that does not crash dmd but produces a wrong error message
void main(){
static char a[1] = [int.max:0,1];
}
Apr 16 2005
parent Thomas Kuehne <thomas-dloop kuehne.thisisspam.cn> writes:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

zwang schrieb am Sun, 17 Apr 2005 12:56:31 +0800:
 void main(){
 static char a[1] = [int.max:0];
 }

 ------
 //a variant that does not crash dmd but produces a wrong error message
 void main(){
 static char a[1] = [int.max:0,1];
 }
Added to DStress as http://dstress.kuehne.cn/nocompile/array_initialization_12.d http://dstress.kuehne.cn/nocompile/array_initialization_13.d http://dstress.kuehne.cn/nocompile/array_initialization_14.d Thomas -----BEGIN PGP SIGNATURE----- iD8DBQFCY2OZ3w+/yD4P9tIRAh28AKDN4ISfPUhoH7DRlJXZ0KLJ1pTLBACgnANR KpXdkLn/ubKmm54MvbJFyOA= =Him1 -----END PGP SIGNATURE-----
Apr 18 2005