Re:Depressing and faintly terrifying days for the C standard...
by vyodaiken on Wednesday May 30, 2018 @05:22PM
(#17191952)
There is nothing to prevent the compiler from deducing that x is non-null without UB. What UB permits is for the the compiler to deduce that x is not null in the absence of information.
so : if(x)f(x) ...code ... if(x)g(x) doesn't need UB
but
y = x-> n ..... code if(x)g(x) - the compiler uses UB to remover the check. This will be especially horrible when LTO becomes more prevalent.
so : if(x)f(x) ...code ... if(x)g(x) doesn't need UB but y = x-> n ..... code if(x)g(x) - the compiler uses UB to remover the check. This will be especially horrible when LTO becomes more prevalent.