[15/15] sim: warnings: enable -Wshadow=local

Message ID 20231222012355.7504-15-vapier@gentoo.org
State New
Headers
Series [01/15] sim: aarch64: fix -Wshadow=local warnings |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_gdb_build--master-aarch64 success Testing passed
linaro-tcwg-bot/tcwg_gdb_build--master-arm success Testing passed
linaro-tcwg-bot/tcwg_gdb_check--master-arm success Testing passed
linaro-tcwg-bot/tcwg_gdb_check--master-aarch64 success Testing passed

Commit Message

Mike Frysinger Dec. 22, 2023, 1:23 a.m. UTC
  This brings us in sync with current set of gdb warnings (for C).
---
 sim/configure                    | 1 +
 sim/m4/sim_ac_option_warnings.m4 | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)
  

Comments

Tom Tromey Dec. 22, 2023, 3:26 p.m. UTC | #1
>>>>> "Mike" == Mike Frysinger <vapier@gentoo.org> writes:

Mike> This brings us in sync with current set of gdb warnings (for C).

FWIW I skimmed this series and it all looked reasonable to me.  I think
it's worth applying.  IIRC in gdb the shadow warning found a few real
bugs, so even if it didn't help the sim immediately, it can still be
helpful as bug prevention.

Tom
  

Patch

diff --git a/sim/m4/sim_ac_option_warnings.m4 b/sim/m4/sim_ac_option_warnings.m4
index faa7198a29b2..dca507076f55 100644
--- a/sim/m4/sim_ac_option_warnings.m4
+++ b/sim/m4/sim_ac_option_warnings.m4
@@ -46,7 +46,7 @@  dnl C++ -Wno-mismatched-tags
 dnl C++ -Wsuggest-override
 -Wimplicit-fallthrough=5
 -Wduplicated-cond
-dnl -Wshadow=local
+-Wshadow=local
 dnl C++ -Wdeprecated-copy
 dnl C++ -Wdeprecated-copy-dtor
 dnl C++ -Wredundant-move