https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87407
Bug ID: 87407 Summary: Enhance -Wunused-function to handle also inline functions Product: gcc Version: 9.0 Status: UNCONFIRMED Keywords: diagnostic Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: marxin at gcc dot gnu.org Blocks: 87403 Target Milestone: --- We properly warn about: $ cat /tmp/unused.c static void foo() { } $ gcc /tmp/unused.c -c -Wall /tmp/unused.c:1:13: warning: ‘foo’ defined but not used [-Wunused-function] static void foo() ^~~ but not about: $ cat /tmp/unused.c static inline void foo() { } Clang does that: $ clang /tmp/unused.c -c -Wall /tmp/unused.c:1:20: warning: unused function 'foo' [-Wunused-function] static inline void foo() ^ 1 warning generated. Referenced Bugs: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87403 [Bug 87403] Issues that suggest a new warning