https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118719
--- Comment #6 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Jakub Jelinek <ja...@gcc.gnu.org>: https://gcc.gnu.org/g:4b2726a62ddfe958302d6790725503ac09b28f11 commit r15-7347-g4b2726a62ddfe958302d6790725503ac09b28f11 Author: Jakub Jelinek <ja...@redhat.com> Date: Tue Feb 4 09:23:15 2025 +0100 c++: Fix up pedwarn for capturing structured bindings in lambdas [PR118719] As mentioned in the PR, this pedwarni is desirable for the implicit or explicit capturing of structured bindings in C++17, but in the case of init-captures the initializer is just some expression and that can include structured bindings. So, the following patch limits the warning to non-explicit_init_p. 2025-02-04 Jakub Jelinek <ja...@redhat.com> PR c++/118719 * lambda.cc (add_capture): Only pedwarn about capturing structured binding if !explicit_init_p. * g++.dg/cpp1z/decomp63.C: New test.