Does GCC's -Wshadow warn on lambda captures that shadow outer variables?
Goal The goal is to determine whether the -Wshadow option should emit a warning when a C++ lambda capture introduces a name that hides an outer variable. Constraints The GCC manual states that -Wshadow applies only to C, yet GCC 10 produces a warning for such lambda captures while GCC 12 does not, and the bug tracker lists this discrepancy as an open issue.