https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124977
--- Comment #2 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Jakub Jelinek <[email protected]>: https://gcc.gnu.org/g:4882367b86188ed846299140b7704e057a6d3f60 commit r17-6756-g4882367b86188ed846299140b7704e057a6d3f60 Author: Mishmish Dev <[email protected]> Date: Fri Nov 27 11:19:23 2026 +0100 c++: Mark empty structured binding as read [PR124977] This fixes the unused warning when an empty structured binding pack is expanded, by explicitly marking its underlying declaration as read. gcc/cp/ChangeLog: PR c++/124977 * pt.cc (tsubst_pack_expansion): Mark the underlying structured binding declaration as read when expanding an empty pack. gcc/testsuite/ChangeLog: PR c++/124977 * g++.dg/cpp26/decomp-pack-unused.C: New test. Signed-off-by: Mishmish Dev <[email protected]>
