Re:C and C++ Prioritize Performance over Correctness
by patmorgan23 on Friday August 18, 2023 @02:47PM
(#37180303)
Yes, but then complier vendors started abusing UB to increase performance and while silently decreasing safety/correctness. If the compiler creates a security bug by optimizing away a bounds check the programmer explicitly put there, that's a problem.
https://thephd.dev/c-undefined-behavior-and-the-sledgehammer...
The point of undefined behavior is "if we specify this, we cause problems for some of the compile targets for this language".