How does D cope with aliasing

Lars T. Kyllingstad public at kyllingen.NOSPAMnet
Mon Sep 7 11:41:17 PDT 2009


#ponce wrote:
> Stewart Gordon Wrote:
>> My recollection of reading the spec is that a D compiler is allowed to 
>> optimise by assuming no pointer aliasing.  But I can't remember at the 
>> moment where I read this.
> 
> I don't know if this is neat or nasty for a compiler to do so. 
> 
> OT : Is there a DMD switch to disable bound check exceptions ? This way I wouldn't have to rely on pointers so much.


The -release switch turns off array bounds checking. However, it also 
disables contracts and asserts.

-Lars


More information about the Digitalmars-d-learn mailing list