diff options
author | Jason Merrill <jason@redhat.com> | 2022-04-05 16:02:04 -0400 |
---|---|---|
committer | Jason Merrill <jason@redhat.com> | 2022-04-06 10:30:12 -0400 |
commit | fd0024e48e94008915a6b18112efbbd8abc81ed8 (patch) | |
tree | 8e261348e8d5b2a5beb45f0b8f19595ffd282a8d /gcc/combine.cc | |
parent | e1a5e7562d53a8d2256f754714b06595bea72196 (diff) | |
download | gcc-fd0024e48e94008915a6b18112efbbd8abc81ed8.zip gcc-fd0024e48e94008915a6b18112efbbd8abc81ed8.tar.gz gcc-fd0024e48e94008915a6b18112efbbd8abc81ed8.tar.bz2 |
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.
Diffstat (limited to 'gcc/combine.cc')
0 files changed, 0 insertions, 0 deletions