3 ms·
int i; […] i += 1; potentially is undefined behavior; i could overflow. Compilers nowadays are fairly good at warning about definite undefined behavior.
by Someone 7y ago
int i;
[…]
i += 1;
potentially is undefined behavior; i could overflow.
Compilers nowadays are fairly good at warning about definite undefined behavior.
I don’t think anybody would be happy with a compiler that aborted on all potential undefined behavior. That would (almost) be equivalent to banning the use of all signed ints.