![]() These options let you change the compiler behavior for that warning when a specific warning level is set. Sets the warning level for the warning number specified by nnnn. The last option that's specified from this group is the one applied: Option The following options are mutually exclusive with each other. For more information, see /WX (Treat linker warnings as errors). For a new project, it may be best to use /WX in all compilations resolving all warnings ensures the fewest possible hard-to-find code defects. For information about which warnings are suppressed by compiler version, see Compiler warnings by compiler version. By default, /Wv uses the current compiler version number, and no warnings are suppressed. It suppresses warnings introduced in Visual Studio 2013 (major version 18) and later. That is, it displays warnings from any version of the compiler that has a major version number of 17 or less. For example, use /Wv:17 to display only warnings introduced in Visual Studio 2012 (major version 17) or earlier. The optional parameter version takes the form nn], where nn is the major version number, mm is the optional minor version number, and bbbbb is the optional build number of the compiler. It lets you maintain your existing build process while you fix them. You can use this option to suppress new warnings in code when you migrate to a newer version of the compiler. For more information, see Compiler warnings that are off by default.ĭisplays only warnings introduced in the version compiler version and earlier. This option helps ensure the fewest possible hard-to-find code defects.ĭisplays all warnings displayed by /W4 and all other warnings that /W4 doesn't include-for example, warnings that are off by default. For a new project, it may be best to use /W4 in all compilations. ![]() We recommend that you use this option to provide lint-like warnings. W4 displays level 1, level 2, and level 3 warnings, and all level 4 (informational) warnings that aren't off by default. W3 displays level 1, level 2, and level 3 (production quality) warnings. W2 displays level 1 and level 2 (significant) warnings. W1 is the default setting in the command-line compiler. Specifies the level of warnings to be generated by the compiler. The warning options and related arguments are described in the following tables: Option The warning options specify which compiler warnings to display and the warning behavior for the entire compilation. Specifies how the compiler generates warnings for a given compilation.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |