In terms of what they practically do, they have *nothing* in common, their
functions are entirely orthogonal.

They are inextricably entangled. Consider:

   if (x == 0) abort();   // essentially what assert(x) does
... at this point, the optimizer knows, beyond doubt, that x!=0 ...
   if (x)  // optimizer can remove this check
      ...

As far as I unterstand, this would be the behaviour without -release. With -release the code becomes

if(x)
    ...

and the optimizer cannot remove the (second) check. Or am I missing something?

Reply via email to