[clang] [Clang] Add -Wtrivial-auto-var-init warning for unreachable variables (PR #178318)
Justin Stitt via cfe-commits
cfe-commits at lists.llvm.org
Mon Feb 9 10:55:55 PST 2026
JustinStitt wrote:
@efriedma-quic
> It looks like this warning is gone in gcc 16. As far as I can tell, they fixed it so it just works: if you jump past the initialization of a variable, it's initialized by the jump itself.
Oh nice, thanks for spotting this.
Should we drop this PR so I can open a new PR implementing this forced initialization scheme that GCC is now using? Perhaps we could first ship this warning for immediate visibility for users?
https://github.com/llvm/llvm-project/pull/178318
More information about the cfe-commits
mailing list