本文共 1819 字,大约阅读时间需要 6 分钟。
原文:
Option | Description |
---|---|
/w | Disables all compiler warnings. |
/W n | Specifies the highest level of warning generated by the compiler. Valid warning levels for n range from 0 to 4:
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. |
/Wall | Enables all warnings, including those disabled by default. See . |
/WX | Treats all compiler warnings as errors. For a new project, it may be best to use /WX in all compilations; resolving all warnings will ensure the fewest possible hard-to-find code defects. The linker also has a /WX option; see for more information. |
/w ln | Specifies the level for a particular warning. The first parameter sets the warning level (same as /Wn) and the second parameter is the actual warning number. For example, /w14326 causes C4326 to be generated as a level 1 warning. |
/wd n | Disables the specified compiler warning where nis the compiler warning number. For example, /wd4326 disables compiler warning C4326. |
/we n | Treats the specific compiler warning as an error where n is a compiler warning. For example, /we4326 flags warning number C4326 as an error. |
/wo n | Reports the error only once where n is a compiler warning. For example, /wo4326 will cause warning C4326 to be reported only once. |
转载地址:http://qxhai.baihongyu.com/