Thanks, D_NoBoundsChecks indeed works.


On Mon, Jun 3, 2013 at 3:19 PM, Ali Çehreli <acehreli@yahoo.com> wrote:
On 06/03/2013 03:11 PM, Timothee Cour wrote:

> A)
> How to query for compiler flags, eg whether or not "noboundscheck" was set?

version D_NoBoundsChecks:

  http://dlang.org/version.html


> B)
> Why aren't we using version=noboundscheck (+ friends) instead of
> -noboundscheck?

Because the runtime is not written in D. :) However, it should be easy to translate version=noboundscheck to -noboundscheck.

That seems like an unimportant technicality, isn't it? 
Couldn't we define version=noboundscheck when noboundscheck is used?
Why use version(D_NoBoundsChecks) instead of version(noboundscheck) ?




> C)
> similar to version(assert) which IIRC was introduced later, could we
> introduce version(noboundscheck) (+ friends) ?

It is there! :) (I haven't test it though.)

Ali