With UB the compiler has no particular requirement to emit the 'ret'. (or, in the example, anything at all for the function)