title: Dead code identification (C++)
body: <p>I have a large legacy C++ project compiled under Visual Studio 2008.  I know there is a reasonably amount of 'dead' code that is not accessed anywhere -- methods that are not called, whole classes that are not used.</p>
  
  <p>I'm looking for a tool that will identify this by <strong>static analysis</strong>.</p>
  
  <p>This question: <a href="https://stackoverflow.com/questions/229069/dead-code-detection-in-legacy-cc-project">Dead code detection in legacy C/C++ project</a> suggests using code coverage tools.  This isn't an option as the test coverage just isn't high enough.  </p>
  
  <p>It also mentions a  -Wunreachable-code. option to gcc. I'd like something similar for Visual Studio.  We already use the linker's /OPT:REF option to remove redundant code, but this doesn't report the dead code at a useful level (when used with /VERBOSE there are over 100,000 lines, including a lot from libraries).</p>
  
  <p>Are there any better options that work well with a Visual Studio project?</p>