[Bug c++/85952] Bogus -Wunused-but-set-variable warning with array structured binding
jakub at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Jun 22 21:28:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85952
--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Author: jakub
Date: Fri Jun 22 21:27:41 2018
New Revision: 261965
URL: https://gcc.gnu.org/viewcvs?rev=261965&root=gcc&view=rev
Log:
Backported from mainline
2018-05-29 Jakub Jelinek <jakub@redhat.com>
PR c++/85952
* init.c (build_aggr_init): For structured binding initialized from
array call mark_rvalue_use on the initializer.
* g++.dg/warn/Wunused-var-33.C: New test.
Added:
branches/gcc-7-branch/gcc/testsuite/g++.dg/warn/Wunused-var-33.C
Modified:
branches/gcc-7-branch/gcc/cp/ChangeLog
branches/gcc-7-branch/gcc/cp/init.c
branches/gcc-7-branch/gcc/testsuite/ChangeLog
More information about the Gcc-bugs
mailing list