https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78964
--- Comment #8 from Markus Trippelsdorf <trippels at gcc dot gnu.org> --- (In reply to David Binderman from comment #7) > (In reply to Markus Trippelsdorf from comment #4) > > And the Linux kernel would not see these warnings anyway: > > > > Makefile: > > 707 # These warnings generated too much noise in a regular build. > > 708 # Use make W=1 to enable them (see scripts/Makefile.build) > > 709 KBUILD_CFLAGS += $(call cc-disable-warning, unused-but-set-variable) > > 710 KBUILD_CFLAGS += $(call cc-disable-warning, unused-const-variable) > > Linux kernel just an example. There are over 100 similar bugs in llvm. > about 20 in netBSD kernel, about a dozen in gcc itself etc. > > Unless you are claiming that every source code that uses gcc switches > off -Wunused-but-set-variable, then I can see some value in this new warning. > > From a user perspective, this new warning isn't a lot different to > -Wunused-but-set-variable and that got implemented, why not this ? Why are you calling these slight style issues bugs? What harm is there in a superfluous variable that the compiler optimizes away? Why should people spend time "fixing" these issues?