dmd 1.048 and 2.033 releases

Walter Bright newshound1 at digitalmars.com
Mon Oct 5 10:51:19 PDT 2009


Nick Sabalausky wrote:
> "Compiler now detects some cases of illegal null dereferencing when compiled 
> with -O"
> 
> A bug-detection feature that's turned on with -O? I assume that's just a 
> temporary situation and is related to either it currently being detected by 
> the optimizer and the feature maybe being in a "trial" phase? Or maybe just 
> a typo? ;) 

No, it's deliberate. Turns out, in order for it to work reliably and not 
give false positives, it needs the full attention of the optimizer. 
Otherwise, you get false positives like:

   int* p = null;
   ...
   if (p)
      *p = 7;



More information about the Digitalmars-d-announce mailing list