Don’t mind the conflicting advice…

I found this little gem in the VS2005 documentation for /W4:

Level 4 displays all level 3 warnings plus informational warnings, which in most cases can be safely ignored. This option should be used only to provide “lint” level warnings and is not recommended as your usual warning level setting.

For a new project, it may be best to use /W4 in all compilations. This will ensure the fewest possible hard-to-find code defects.

Whoops. Time to file a documentation bug.

It is the little inconsistencies like this that really contribute to the perception that MSDN is difficult to understand and use, I think.

4 Responses to “Don’t mind the conflicting advice…”

  1. KJK::Hyperion says:

    What it *really* means is “our own headers raise so many warnings this setting is virtually useless”

  2. Skywing says:

    You know, I bet that’s the reason why they have #pragma warning(push), so you can turn off all the warnings for the DDK/SDK headers.

  3. Bugcheck says:

    Agreed, I lately have used the following many times even if im building /W3:
    #pragma warning(push,3)
    #include
    #pragma warning(pop)

  4. Bugcheck says:

    that was a ntddk.h in the include. I used tags and I guess the blog server got upset.