https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91972
Bug ID: 91972 Summary: Bootstrap should use -Wmissing-declarations Product: gcc Version: 10.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: other Assignee: unassigned at gcc dot gnu.org Reporter: amonakov at gcc dot gnu.org Target Milestone: --- In the good old days when gcc was written in C, bootstrap stage2/3 enabled -Wmissing-prototypes and so it caught attempted definitions of functions that should be static, but were not declared so. Transition to C++ did not change -Wmissing-prototypes to -Wmissing-declarations, so over time several violations crept in. In particular this penalizes optimization during non-LTO bootstrap (the compiler has to assume the function might be used in another TU, even though in reality all uses are in current file and it simply misses the 'static' keyword).