re PR c++/82600 (Address of local variable returned [-Werror=return-local-addr] when...
authorJakub Jelinek <jakub@redhat.com>
Thu, 19 Oct 2017 14:24:39 +0000 (16:24 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Thu, 19 Oct 2017 14:24:39 +0000 (16:24 +0200)
commitd969783705f55506c111e4f4d0342b09ef301ea2
tree35137fd3ab0e4e10028a005e2479124b10726f70
parentdb62ad7c66e97b45a4286932bcab3926bd571227
re PR c++/82600 (Address of local variable returned [-Werror=return-local-addr] when building mozilla-central)

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.

From-SVN: r253899
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]