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;

Reply via email to