← Back to context

Comment by mathisfun123

10 hours ago

.... The blog post literally demonstrates that it is not. Feel free to repro on your own machine.

The main function in the blog post returns at the end of all control paths. Firstly because main has an implicit "return 0" at the end and secondly because no control paths end. It doesn't jump to unreachable because it lacks a return - it jumps there because that's how this implementation has chosen to compile UB, despite the presence of all necessary returns.