This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/44859] missed warning: returning reference to temporary
- From: "jason at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 01 Apr 2014 00:49:05 +0000
- Subject: [Bug c++/44859] missed warning: returning reference to temporary
- Auto-submitted: auto-generated
- References: <bug-44859-4 at http dot gcc dot gnu dot org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44859
--- Comment #1 from Jason Merrill <jason at gcc dot gnu.org> ---
Author: jason
Date: Tue Apr 1 00:48:33 2014
New Revision: 208970
URL: http://gcc.gnu.org/viewcvs?rev=208970&root=gcc&view=rev
Log:
PR c++/44859
* typeck.c (maybe_warn_about_returning_address_of_local): Unwrap
COMPONENT_REFs and ARRAY_REFs sooner.
Added:
trunk/gcc/testsuite/g++.dg/warn/Wreturn-local-addr-2.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/typeck.c