https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100608
--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-11 branch has been updated by Jason Merrill <ja...@gcc.gnu.org>: https://gcc.gnu.org/g:c52cd0b35d356565f67f7956f4defc022dfa2172 commit r11-9829-gc52cd0b35d356565f67f7956f4defc022dfa2172 Author: Jason Merrill <ja...@redhat.com> Date: Tue Apr 5 16:02:04 2022 -0400 c++: -Wshadow=compatible-local type vs var [PR100608] The patch for PR92024 changed -Wshadow=compatible-local to warn if either new or old decl was a type, but the rationale only talked about the case where both are types. If only one is, they aren't compatible. PR c++/100608 gcc/cp/ChangeLog: * name-lookup.c (check_local_shadow): Use -Wshadow=local if exactly one of 'old' and 'decl' is a type. gcc/testsuite/ChangeLog: * g++.dg/warn/Wshadow-compatible-local-3.C: New test.