[Bug c++/77591] [6/7 Regression] decltype(auto) and ternary operator allow returning local reference without a warning
jakub at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Nov 28 15:33:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77591
--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Author: jakub
Date: Mon Nov 28 15:21:53 2016
New Revision: 242924
URL: https://gcc.gnu.org/viewcvs?rev=242924&root=gcc&view=rev
Log:
PR c++/77591
* typeck.c (maybe_warn_about_returning_address_of_local): Optimize
whats_returned through fold_for_warn.
* g++.dg/cpp1y/pr77591.C: New test.
Added:
trunk/gcc/testsuite/g++.dg/cpp1y/pr77591.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/typeck.c
trunk/gcc/testsuite/ChangeLog
More information about the Gcc-bugs
mailing list