Treats specified warning as error. Allows user to selectively upgrade a warning type to an error. Only tokenpasting warning does not upgrade to an error. All other available warning types can be issued as errors.
-warningerror keyword [,...]
-we keyword [,...]
-warnerror keyword [,...]
The options for keyword are:
off
Turns off all warning messages as errors. Passed to all tools. Equivalent to
#pragma warning_as_error off
most
Turns on most warning messages as errors. Passed to all tools. Equivalent to
#pragma warning_as_error on
[no]cmdline
Passed to all tools.
all
Turns on almost all warning messages (likely to generate spurious warnings/errors) and required prototypes to errors.
[no]pragmas | [no]illpragmas
Issues error messages on invalid pragmas. Equivalent to
#pragma warn_illpragma_as_error
[no]empty[decl]
Issues error messages on empty declarations. Equivalent to
#pragma warn_emptydecl_as_error
[no]possible | [no]unwanted
Issues error messages on possible unwanted effects. Equivalent to
#pragma warn_possunwanted_as_error
[no]unusedarg
Issues error messages on unused arguments. Equivalent to
#pragma warn_unusedarg_as_error
[no]unusedvar
Issues error messages on unused variables. Equivalent to
#pragma warn_unusedvar_as_error
[no]unused
Same as
-we [no]unusedarg,[no]unusedvar
[no]extracomma | [no]comma
Issues error messages on extra commas in enumerations. The compiler ignores terminating commas in enumerations when compiling source code that conforms to the ISO/IEC 9899-1999 ("C99") standard. Equivalent to
#pragma warn_extracomma_as_error
[no]pedantic | [no]extended
Pedantic error checking.
[no]hidevirtual | [no]hidden[virtual]
Issues error messages on hidden virtual functions. Equivalent to
#pragma warn_hidevirtual_as_error
[no]implicit[conv]
Issues error messages on implicit arithmetic conversions. Implies
-warn impl_float2int,impl_signedunsigned
[no]impl_int2float
Issues error messages on implicit integral to floating conversions. Equivalent to
#pragma warn_impl_i2f_conv_as_error
[no]impl_float2int
Issues error messages on implicit floating to integral conversions. Equivalent to
#pragma warn_impl_f2i_conv_as_error
[no]impl_signedunsigned
Issues error messages on implicit signed/unsigned conversions.
[no]notinlined
Issues error messages for functions declared with the inline qualifier that are not inlined. Equivalent to
#pragma warn_notinlined_as_error
[no]largeargs
Issues error messages when passing large arguments to unprototyped functions. Equivalent to
#pragma warn_largeargs_as_error
[no]structclass
Issues error messages on inconsistent use of class and struct. Equivalent to
#pragma warn_structclass_as_error
[no]padding
Issue error messages when padding is added between struct members. Equivalent to
#pragma warn_padding_as_error
[no]notused
Issues error messages when the result of non-void-returning functions are not used. Equivalent to
#pragma warn_resultnotused_as_error
[no]missingreturn
Issues error messages when a return without a value in non-void-returning function occurs. Equivalent to
#pragma warn_missingreturn_as_error
[no]unusedexpr
Issues error messages when encountering the use of expressions as statements without side effects. Equivalent to
#pragma warn_no_side_effect_as_error
[no]ptrintconv
Issues error messages when lossy conversions occur from pointers to integers.
[no]anyptrintconv
Issues error messages on any conversion of pointers to integers. Equivalent to
#pragma warn_ptr_int_conv_as_error
[no]undef[macro]
Issues error messages on the use of undefined macros in #if and #elif conditionals. Equivalent to
#pragma warn_undefmacro_as_error
[no]filecaps
Issues error messages when # include "" directives use incorrect capitalization. Equivalent to
#pragma warn_filenamecaps_as_error
[no]sysfilecaps
Issues error messages when # include <> statements use incorrect capitalization. Equivalent to
#pragma warn_filenamecaps_system_as_error
display | dump
Displays list of active warnings.