Hi
GCC does warn if returning a pointer to a local variable (stack memory).
But there are alot of more cases where GCC could possibly warn,
eg. when references are made to local variables or stack memory.
See this attached example code.
GCC warns for first case, but not the others.
I think all ca
"sa...@hederstierna.com" writes:
> GCC does warn if returning a pointer to a local variable (stack memory).
> But there are alot of more cases where GCC could possibly warn,
> eg. when references are made to local variables or stack memory.
>
> See this attached example code.
> GCC warns for firs
family/c-common.c. I haven't really thought about what is required
> here, though.
I've added the following enhancement request to bugzilla
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52923
"BugĀ 52923 - Warn if making external references to local stack memory"
Thanks & Best Regards
Fredrik