This causes undefined behavior. Do not do this.
The implementation, realistic, the link will point to the stack, where there used to be a stack stack for calling foo
. In many cases, this memory still makes sense, so the error is often not immediately obvious. Therefore, you should ensure that you never make such a link.
source share