PR c++/82600
commite6e9878940feb02d0a3cc7b2796a9ab9677b74ed
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 19 Oct 2017 14:24:39 +0000 (19 14:24 +0000)
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 19 Oct 2017 14:24:39 +0000 (19 14:24 +0000)
tree35137fd3ab0e4e10028a005e2479124b10726f70
parentbff9f879c485ad7c6bff63843228a63774f6e195
PR c++/82600
* typeck.c (check_return_expr): Don't call
maybe_warn_about_returning_address_of_local in templates.

* g++.dg/warn/Wreturn-local-addr-4.C: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@253899 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/cp/ChangeLog
gcc/cp/typeck.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/warn/Wreturn-local-addr-4.C [new file with mode: 0644]