PR c++/87582
commitdf5680b76c785fc7ad69adce23ed8dcc68d9bcb6
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 11 Oct 2018 13:46:27 +0000 (11 13:46 +0000)
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 11 Oct 2018 13:46:27 +0000 (11 13:46 +0000)
tree925b629f996ac7888768a79b60da306c0fd16eb4
parent5a60b5b74a617e4f7a84755df95c86289dda4d0d
PR c++/87582
* typeck.c (maybe_warn_about_returning_address_of_local): If
whats_returned is a structured binding identifier and the structured
binding is a reference, recurse on its initializer.

* g++.dg/cpp1z/decomp48.C: New test.

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