[PATCH v2] c-decl: Add -Wshadow=used [PR92386]

2025-05-27 Thread Matthew Sotoudeh
This is a small patch to address https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92386 updated thanks to Andrew's feedback. This patch implements "-Wshadow=used," which throws a warning for shadowed variables only if the shadowed variable was previously used in the same scope where it is being shadow

[PATCH] gimplify: Add -Wuse-before-shadow [PR92386]

2025-05-16 Thread Matthew Sotoudeh
This is a small patch to address https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92386 When a variable is used before being shadowed in the same scope, GCC outputs incorrect/misleading debug information. The Bugzilla report has a minimal example and explains why a direct fix was not desirable (debug