2 ms·
clang has a -Wunneeded-member-function that is not included in -Wall: https://clang.llvm.org/docs/DiagnosticsReference.html#wunneeded-member-function https://c
by cpeterso 6y ago
clang has a -Wunneeded-member-function that is not included in -Wall:
https://clang.llvm.org/docs/DiagnosticsReference.html#wunneeded-member-function https://clang.llvm.org/docs/DiagnosticsReference.html#wunnee...
“warning: member function A is not needed and will not be emitted”
- flohofwoe 6y agoAt least clang and gcc will also warn about unused static functions (included in -Wall though). IMHO that's a good reason to use static-by-default (and also not to split a project into a myriad of tiny source files, since this usually means less functions can be made static). Of course in the end LTO will take care of unused functions project-wide, but you'll not get a warning about stale functions that way.