https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66869
Bug ID: 66869 Summary: [6 regression] -Wunused-function no longer warns for static declarations without definition Product: gcc Version: 6.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: sirl at gcc dot gnu.org Target Milestone: --- Up to gcc-5.1.1 r225711 -Wunused-functions warns like that: > echo 'static void test(void);' | LANG=C gcc-5 -c -Wunused-function -x c - <stdin>:1:13: warning: 'test' declared 'static' but never defined [-Wunused-function] > But gcc-6.0.0 r225711 remains silent: > echo 'static void test(void);' | LANG=C gcc-6 -c -Wunused-function -x c - > BTW, maybe it would make sense to split out this part from -Wunused-function into a separate -Wstatic-decl-without-def. That's because likely more people would like to turn this part of the warning into an error instead of all of -Wunused-function.