I was looking for a way of finding statically unreachable functions in a (very) big C++ project. I had tried using doxygen and other static analysis tools suggested here but it seemed that the project is too complicated for them to handle. Finally i decided that using GCC tools (g++, gprof, gcov, etc.) is the safest option, although I couldn't figure out how to do it.
I think the g++ optimizations eliminate statically unreachable functions but I'm not sure how to get the names of the functions it eliminates.
Do you have any suggestions?