3 ms·
> So yes, the spec does say that compilers are allowed to assume UB doesn't happen. They are allowed to do so, but in practice this choice is not helpful.
by marssaxman 4y ago
> So yes, the spec does say that compilers are allowed to assume UB doesn't happen.
They are allowed to do so, but in practice this choice is not helpful.
- saagarjha 4y agoOn the contrary, it is quite helpful–it is how C optimizers reason.