views:

63

answers:

1

Running Visual Studio 2008 Professional it is possible to enable static code analysis using the /analyze flag (even though this is not supported for the Professional version according to the documentation).

In Visual Studio 2010 Professional this no longer works. Instead there is a default /analyze- flag added (one I can't find a GUI setting for). This does not work as well as the VS2008 version (or at all).

Can anyone shed some light into this? What does the new /analyze- flag do and is there any way to enable the old analysis?

A: 

The compiler in 2010 is the non-enterprise one. VS 2008 happened to ship with the enterprise compiler. (Compare the output of cl /?)

/analyze- turns off static analysis. What you could do is see if the latest Platform SDK ships with the enterprise compilers (they did in the past), and configure your paths in VS to use them instead.

Alex
I just tried with the RTM release of Windows SDK 7.1 and the /analyze flag does indeed work.
Martin