https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121553
--- Comment #17 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The trunk branch has been updated by Marek Polacek <mpola...@gcc.gnu.org>: https://gcc.gnu.org/g:51fbd1e4ea8023847d786a0fdc89219e93bcc666 commit r16-3305-g51fbd1e4ea8023847d786a0fdc89219e93bcc666 Author: Marek Polacek <pola...@redhat.com> Date: Wed Aug 20 10:49:47 2025 -0400 c++: lambda capture and shadowing [PR121553] P2036 says that this: [x=1]{ int x; } should be rejected, but with my P2036 we started giving an error for the attached testcase as well, breaking Dolphin. So let's keep the error only for init-captures. PR c++/121553 gcc/cp/ChangeLog: * name-lookup.cc (check_local_shadow): Check !is_normal_capture_proxy. gcc/testsuite/ChangeLog: * g++.dg/warn/Wshadow-19.C: Revert P2036 changes. * g++.dg/warn/Wshadow-6.C: Likewise. * g++.dg/warn/Wshadow-20.C: New test. * g++.dg/warn/Wshadow-21.C: New test. Reviewed-by: Jason Merrill <ja...@redhat.com>