On Wednesday, 30 July 2014 at 22:30:59 UTC, Walter Bright wrote:
On 7/30/2014 3:20 PM, Artur Skawina via Digitalmars-d wrote:
void f(ubyte[] a) @safe { assert(a.length>99); a[88] =
a[77]; }
The compiler will insert array bounds checking for you.
Trying to understand what your position is: In release mode, but
with bounds checking enabled, would the compiler
a) be allowed to replace this with a RangeError or, say, ud2 or
another halt()-type instruction?
b) treat any call to f() as undefined behavior?
Cheers,
David