/Wgrp Compiler Option

Syntax: Default:
/Wgrp[+|-] [grp] /Wall-pro+ret+cnd+

Use /Wgrp to generate messages in the grp group. You can specify more than one group.

The /Wgrp options control informational messages that warn of possible programming errors, weak programming style, and other information about the structure of your programs. Similar messages are in groups, or suboptions, to give you greater control over which types of messages you want to generate. You can also specify these groups in your source code, with #pragma info.

By default, the compiler generates diagnostic messages in the pro, ret, and cnd groups.

When you specify /Wall[+], all suboptions are turned on and all possible diagnostic messages are reported. Because even a simple program that contains no errors can produce many informational messages, you may not want to use /Wall very often. You can use the suboptions alone or in combination to specify the type of messages that you want the compiler to report. Suboptions can be separated by an optional + sign. To turn off a suboption, you must place a - sign after it.

You can also combine the /W[0|1|2|3] options with the /Wgrp options.

The following table lists the message groups and the message numbers that each controls. Messages generated for C files begin with EDC0, and messages for C++ files begin with EDC3.

/Wgrp Options
grp Controls Messages About ... Messages
/Wall All diagnostics. All message numbers listed in this table.
/Wcls Use of classes. EDC3110, EDC3253, EDC3266
/Wcmp Possible redundancies in unsigned comparisons. EDC3138
/Wcnd Possible redundancies or problems in conditional expressions. EDC0420 - EDC0427 EDC3107, EDC3130, EDC3388, EDC3389 - EDC3393
/Wcns Operations involving constants. EDC0475 - EDC0477, EDC3131, EDC3219, EDC3220
/Wcnv Conversions. EDC3313, EDC3528
/Wcpy Problems generating copy constructors. EDC3199, EDC3200
/Wdcl Consistency of declarations. EDC0716
/Weff Statements with no effect. EDC0509, EDC0435, EDC0436, EDC0437, EDC0473, EDC0474, EDC0478, EDC0479, EDC0483, EDC3165, EDC3215
/Wenu Consistency of enum variables. EDC0439, EDC0440, EDC0471, EDC3137, EDC3366
/Wext Unused external definitions. EDC0415, EDC0493, EDC0494, EDC3127
/Wgen General diagnostics. EDC0438, EDC0448, EDC0466, EDC0480, EDC0489, EDC0492, EDC3101
/Wgnr Generation of temporary variables. EDC3151
/Wgot Usage of goto statements. EDC0413
/Wini Possible problems with initialization. EDC0444, EDC0445, EDC0446, EDC0447, EDC0482
/Winl Functions not inlined. EDC3542
/Wlan Effects of the language level. EDC3116
/Wobs Features that are obsolete. EDC0450, EDC0470
/Word Unspecified order of evaluation. EDC0428, EDC0429, EDC0430, EDC0431, EDC0432
/Wpar Unused parameters. EDC0414, EDC3126
/Wpor Nonportable language constructs. EDC0433, EDC0434 EDC3108, EDC3133, EDC3135, EDC3136, EDC3307
/Wppc Possible problems with using the preprocessor. EDC0076, EDC0290, EDC0293, EDC0311, EDC0312, EDC0313, EDC0389, EDC0441, EDC0442, EDC0443, EDC0457, EDC0468
/Wppt Trace of preprocessor actions. EDC0467
/Wpro Missing function prototypes. EDC0304
/Wrea Code that cannot be reached. EDC0472, EDC0520, EDC3119
/Wret Consistency of return statements. EDC0449, EDC0481
/Wtrd Possible truncation or loss of data or precision. EDC0374, EDC0416, EDC0418, EDC0419, EDC0451, EDC0452, EDC0453, EDC0495, EDC3108, EDC3135, EDC3136
/Wtru Variable names truncated by the compiler. EDC0484
/Wund Casting of pointers to or from an undefined class. EDC3098, EDC3397, EDC3405, EDC3406
/Wuni Uninitialized variables. EDC0412
/Wuse Unused auto and static variables. EDC0409, EDC0410, EDC0469, EDC0490, EDC0491, EDC3002, EDC3099, EDC3100, EDC3101
/Wvft Generation of virtual function tables. EDC3280, EDC3281, EDC3282

Examples

    icc  /Wpar+pro+uni blue.c

    icc  /Wparprouni blue.c


Summary of Compiler Options
Summary of Compiler Error Messages