On 7/30/14, 12:19 PM, Daniel Murphy wrote:
"Ary Borenszweig"  wrote in message news:[email protected]...

> He's asking for assert to mean 'check this condition' and assume to
mean
> 'optimize as if this is a mathematical identity'.

And how is that different if instead of:

if (x != 3) assert(0);

you write:

assume(x != 3);

Because if assert only means 'check this condition' then the optimizer
can't optimize based on the assumption that it's true.

Assert means: check this condition and terminate the program if it doesn't hold.

So why can't the compiler optimize based on this?

Reply via email to