Why it's (return local variable on stack) one of c++ undefined behaviour and all compilers just give a warning ?
Why do compilers give a warning about returning a reference to a local stack variable if it is undefined behaviour?