[Bug c++/81597] returns link to temporary value

2017-07-28 Thread glisse at gcc dot gnu.org
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

[Bug c++/81597] returns link to temporary value

2017-07-28 Thread lisp2d at rambler dot ru
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.

[Bug c++/81597] returns link to temporary value

2017-07-28 Thread glisse at gcc dot gnu.org
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)

[Bug c++/81597] returns link to temporary value

2017-07-28 Thread lisp2d at rambler dot ru
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81597 --- Comment #4 from Lisp2D --- -Werror=return-local-addr it is all i want thnx

[Bug c++/81597] returns link to temporary value

2017-07-28 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81597 Andrew Pinski changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|---