[Bug c++/104142] [9/10/11/12 Regression] Spurios warning unused-variable on const static variable and defaulted constructor
jakub at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Jan 28 11:32:37 GMT 2022
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104142
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
It isn't clear what exactly is the regression.
We warn on b with -Wunused-variable since
r9-412-gb46b715d5b838d9869f89d3594ebf7d0b7cb374c
A and B aren't the same, one has explicit defaulted ctor, the other has
implicit ctor.
-Wunused-const-variable warns about a and not b since its introduction in
r6-3283-g0f876f22887f239cedca64ff170b71e5f1daaf54
More information about the Gcc-bugs
mailing list