version(noboundscheck) + friends

Ali Çehreli acehreli at yahoo.com
Mon Jun 3 15:19:22 PDT 2013


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.

 > 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



More information about the Digitalmars-d-learn mailing list