2 ms·
Implementation defined behavior does the same thing for a given implementation. The compiler can produce totally different code every time you compile a program
by UncleMeat 9y ago
Implementation defined behavior does the same thing for a given implementation. The compiler can produce totally different code every time you compile a program with UB. It can even affect code that is totally unrelated to the UB.
- mattkrause 9y agoI'm not sure I buy that second part. Legalistically, I guess it could (the behavior isn't defined, after all), but typically the optimizer makes some valid-only-if-the-code-is deductions and things snowball from there....