function returns address of local variable, but it still compile in c, why? – Debian
Even I get an warning a function returns an address from local variable, it compiles. Isn't it then UB of compiler? The generated assembly: .text .LC0: .asciz "%in" .globl foo .type foo, @function foo: pushq %rbp # movq %rsp, %rbp…