https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65213
Bug ID: 65213 Summary: Extend -Wmissing-declarations to variables Product: gcc Version: 5.0 Status: UNCONFIRMED Severity: enhancement Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: eugene.zelenko at gmail dot com Will be good idea to -Wmissing-declarations to variables. Global variable should have extern declaration in header file, otherwise variable should be static. Clang detect such situations with -Wmissing-variable-declarations. Same should be done for C++.