digitalmars.D.bugs - bound checking & constant index
- Thomas Kuehne (15/15) Apr 18 2005 -----BEGIN PGP SIGNED MESSAGE-----
- Burton Radons (6/18) Apr 18 2005 Update your DMD; 0.121 says:
- Burton Radons (2/2) Apr 18 2005 I see you have 0.121 installed, Thomas. Sorry, what do you mean by your...
- Thomas Kuehne (9/11) Apr 18 2005 -----BEGIN PGP SIGNED MESSAGE-----
- Stewart Gordon (18/41) Apr 19 2005 In certain conditions, not having compile-time ABC would be totally
- Stewart Gordon (6/17) Apr 19 2005 Just spotted another name you've used twice: bounds_checking_02.
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 XPASS: http://dstress.kuehne.cn/nocompile/bounds_checking_04.d Thomas -----BEGIN PGP SIGNATURE----- iD8DBQFCZBt/3w+/yD4P9tIRAqfkAKC91ZvKkjYq76F+ML66vQXN7T0XYgCfXSVo wmtNloKBDwA4//5aoz61BWI= =WMRG -----END PGP SIGNATURE-----
Apr 18 2005
Thomas Kuehne wrote:-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 XPASS: http://dstress.kuehne.cn/nocompile/bounds_checking_04.dUpdate your DMD; 0.121 says: d.d(5): array index [-1] is outside array bounds [0 .. 2] I don't think this should be in a stress test either because detecting these scenarios is a quality-of-implementation issue. But it would be useful to implementors to have this information.
Apr 18 2005
I see you have 0.121 installed, Thomas. Sorry, what do you mean by your post? It's pretty terse. :)
Apr 18 2005
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Burton Radons schrieb am Mon, 18 Apr 2005 19:26:38 -0700:I see you have 0.121 installed, Thomas. Sorry, what do you mean by your post? It's pretty terse. :)Sorry, must have been a typo ... -----BEGIN PGP SIGNATURE----- iD8DBQFCZHei3w+/yD4P9tIRApq/AKDFoNVRJrYFt2SBMPjGNl0j83dBCgCgocC5 av0dwvei0qZBHuPgktbLN8M= =dsf9 -----END PGP SIGNATURE-----
Apr 18 2005
Burton Radons wrote:Thomas Kuehne wrote:In certain conditions, not having compile-time ABC would be totally naive. In this instance, the code is semantically identical to int[2] array; array[-1] = 1; and should compile/behave in the same way. Generally, if the array is static and the index is a compile-time constant, the only sane solution is to generate a direct access to the memory location. To generate all the run-time ABC code for such a trivial case would be almost a pessimisation, and the only other alternative would be to generate an equally perverse, explicit throw new ArrayBoundsError(...); statement at that point. It follows that it's pretty basic to have this as a compiler error. Stewart. -- My e-mail is valid but not my primary mailbox. Please keep replies on the 'group where everyone may benefit.-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 XPASS: http://dstress.kuehne.cn/nocompile/bounds_checking_04.dUpdate your DMD; 0.121 says: d.d(5): array index [-1] is outside array bounds [0 .. 2] I don't think this should be in a stress test either because detecting these scenarios is a quality-of-implementation issue. But it would be useful to implementors to have this information.
Apr 19 2005
Thomas Kuehne wrote:-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 XPASS: http://dstress.kuehne.cn/nocompile/bounds_checking_04.dJust spotted another name you've used twice: bounds_checking_02. Stewart. -- My e-mail is valid but not my primary mailbox. Please keep replies on the 'group where everyone may benefit.
Apr 19 2005