While developing my software, I declared many class functions that are not called anymore.
Now, I would like to tidy my sources, and get rid of those declarations.
GCC can detect unused variables, but is there a GCC option to detect unused class functions ? Or do I need upgrade for this (4.9.2) ?
By looking into the reference of GCC , you will find
-Wunused-function. But it only marks static or inline functions.To mark member functions, you should take a look at clang, which can be a drop-in replacement for GCC. Clang offers
-Wunused-member-function. https://clang.llvm.org/docs/DiagnosticsReference.html