2 ms·
> This bug is a misfiring attempt at detecting undefined behavior to allow for optimizations. I don't think it is. It's the same as removing the conditional he
by saagarjha 7y ago
> This bug is a misfiring attempt at detecting undefined behavior to allow for optimizations.
I don't think it is. It's the same as removing the conditional here:
int foo = 1;
if (foo) {
// whatever
}
The compiler (incorrectly) deduced that the pointer was non-NULL and removed the check because it saw it as unnecessary.