Jonathan M Davis
jmdavisProg at gmx.com
Thu Nov 3 12:47:18 PDT 2011
On Thursday, November 03, 2011 20:36:03 Marco Leise wrote:
> Am 03.11.2011, 16:54 Uhr, schrieb Jonathan M Davis <jmdavisProg at gmx.com>:
> > [...] So, really, there is no way to have -release affect
> > any code in Phobos beyond what it does to the language in general
> > (remove
> > assertions and remove array bounds checking in @system code), even if we
> > wanted it to, which is debatable.
> > - Jonathan M Davis
> So the current situation for D2 is that in -release mode only code
> explicitly annotated @safe/@trusted will do boundary checking, while it is
> still removed from all 'normal' functions?
Well, templated functions could be inferred as @safe and would then presumably
be treated the same, but yes, from what I understand, -release removes bounds
checking on arrays (and AAs) in @system code but not @safe or @trusted code.
Compiling with -noboundscheck will turn off bounds checking completely.
- Jonathan M Davis
More information about the Digitalmars-d