https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100608

--- Comment #2 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jason Merrill <ja...@gcc.gnu.org>:

https://gcc.gnu.org/g:fd0024e48e94008915a6b18112efbbd8abc81ed8

commit r12-8021-gfd0024e48e94008915a6b18112efbbd8abc81ed8
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.cc (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.

Reply via email to