Re:Falsehoods programmers believe about undefined behavior
by wyldfire on Monday November 28, 2022 @07:44AM
(#33772910)
"The line with UB" becomes a very vague notion well before the program even executes. You can see this by dumping the disassembly of your program. The compiler can determine when values are defined and used and will emit code that satisfies the semantics of your program (according to the language specification). This often means that expressions within the same statement get evaluated at significantly different times, hoisted outside of loops, etc.
[ Parent
| on HN ]