https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81597
--- Comment #1 from Marc Glisse ---
Sorry, what change are you asking for?
Compiling with current gcc, we get plenty of warnings, and at runtime:
int &&
zsh: segmentation fault ./a.out
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81597
--- Comment #2 from Lisp2D ---
Make an error (don't compile) when returns rvalue from these functions.
To forbid or banning.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81597
--- Comment #3 from Marc Glisse ---
-Werror=return-local-addr
(we cannot reject those programs by default, if the caller ignores what the
function returns, the program may be valid)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81597
--- Comment #4 from Lisp2D ---
-Werror=return-local-addr
it is all i want
thnx
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81597
Andrew Pinski changed:
What|Removed |Added
Status|UNCONFIRMED |RESOLVED
Resolution|---