[Bug other/91972] New: Bootstrap should use -Wmissing-declarations
amonakov at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Oct 2 16:04:00 GMT 2019
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).
More information about the Gcc-bugs
mailing list