I'm currently rebuilding my world with Visual Studio 2008. So far things are going ok, but as I mentioned back when I was playing with Beta 2, the new C4627 warning about header files being skipped when processing precompiled headers is a bit broken...
It seems that the code that works out if a header file is skipped (ie not included in the precompiled header but above the #pragma hdrstop line works on exact path matches rather than a file include graph. So, if header A includes header B and the precompiled header builds by including A but the source file builds by including B then you'll get an error even though everything is OK.. Which is a pity.
What's more of a pity is that it's hard to turn off this warning, a pragma in a header file doesn't seem to do the trick (even when the header is included in both precomp and non precomp areas). This means that I have to shuffle some headers around for no good reason if I want to keep my "warning level 4/warnings as errors" policy.
You can turn off disable specific warnings in the C/C++ Advanced settings page for the project.
Posted by: Harold at November 30, 2007 05:10 AMThanks Harold, I hadn't thought of that. I usually turn off warnings in a single header file that's shared by all my projects but that doesnt work for these.
Switching them off on a project by project basis will work though. Thanks.
Posted by: Len at November 30, 2007 08:30 AM