Use Compiler/Linker for C++ Code Clean-up

c++, static-analysis, visual-studio-2008

Solution

PC-Lint "whole project" analysis (which analyses multiple files together) can do this. Please feel free to contact me if you need help setting it up.

Problem

I'm using VS2008 for a C++ project. The code is quite old and has passed through many hands. There are several classes hierarchies, functions, enums and so on which are no longer being used. Is there a way to get the compiler/linker to list out identifiers which have been declared or defined but are not being referred to anywhere?

Original source