-release compiler switch and associative arrays

Kagamin spam at here.lot
Tue Oct 11 22:19:19 PDT 2011


Vijay Nayar Wrote:

> void main() {
>     int[] ages = [28, 23, 40];
>     assert(ages[0] == 28);
>     ages[3] = 54;
>     assert(ages[3] == 54);
> }
> 
> $ dmd -release bounds.d
> $ ./bounds 
> # No segfault because the address is within the address space
> # for the program allowed by the OS.

Walter said this feature was removed and now you need -no-bounds-check switch to turn checks off in release mode.


More information about the Digitalmars-d-learn mailing list