Diego Novillo <[EMAIL PROTECTED]> wrote:
>> There has been some opposition in the past about allowing conditions in
>> asserts to be used as hints to the optimizers. In fact, I would like to
>> know if there is a current statement of purpose about this. That is,
would
>> there be strong oppositions to patches doing this?
>>
> VRP naturally takes advantage of assert (though not in some
> occassions involving unsigned types). Try:
>
> #include <assert.h>
>
> foo (int i)
> {
> assert (i != 0);
> if (i == 0)
> return 3;
>
> return 2;
> }
Agreed, but my point is whether we can do that when NDEBUG is defined.
--
Giovanni Bajo