Run Code  | API  | Code Wall  | Users  | Misc  | Feedback  | Login  | Theme  | Privacy  | Patreon 

return reference (clang)

Language: Layout:
+ ] Compiler args + ] Show input
Compilation time: 0.83 sec, absolute running time: 0.2 sec, cpu time: 0.13 sec, memory peak: 3 Mb, absolute service time: 1,11 sec 
edit mode |  history  | discussion
Warning(s):
source_file.cpp:5:38: warning: reference to stack memory associated with local variable 'a' returned [-Wreturn-stack-address]
const int& func() { int a=10; return a; }
                                     ^
1 warning generated.
b: 4199424
ra: 4199424
aa: 4199424
stack: 4199424
function: -1773916248