[Bug c++/104397] Wrong warning message about global static variable in module(.hpp, .cpp)
jakub at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sat Feb 5 13:08:49 GMT 2022
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104397
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
The warning is correct.
While static int a; var is used in class.cpp, you have another copy of that in
the main.cpp TU, and there it is defined but unused.
More information about the Gcc-bugs
mailing list