2 ms·
Defined is not the same as correct.
by ncmncm 7y ago
Defined is not the same as correct.
- saagarjha 7y agoBut undefined is the same as incorrect. Any signed overflow in your C or C++ program is a place where you’ve opened yourself up to some quite problematic consequences.
- ncmncm 7y agoYes, just as in Rust. Pretend correctness is not correctness just because it is not UB. I have the same discussion with people who insist unsigned types in C++ or C are safer than signed types because of the UB boogeyman. They only demonstrate their own limited understanding.