https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104142
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |9.5 Summary|Spurios warning |[9/10/11/12 Regression] |unused-variable on const |Spurios warning |static variable and |unused-variable on const |defaulted constructor |static variable and | |defaulted constructor --- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> --- There was no -Wunused-variable warning for b before GCC 8. -Wunused-const-variable didn't warn about b either in GCC 8 (and before).