-warnings

Specifies which warning messages the command-line tool issues. This command is global.

Syntax
  -w[arning] keyword [,...]

  

The options for keyword are:

off

Turns off all warning messages. Passed to all tools. Equivalent to

  #pragma 

  warning off

  

on

Turns on most warning messages. Passed to all tools. Equivalent to

  #pragma 

  warning on

  

[no]cmdline

Passed to all tools.

[no]err[or] | [no]iserr[or]

Treats warnings as errors. Passed to all tools. Equivalent to

  #pragma 

  warning_errors

  

all

Turns on all warning messages and require prototypes.

[no]pragmas | [no]illpragmas

Issues warning messages on invalid pragmas. Equivalent to

  #pragma 

  warn_illpragma

  

[no]empty[decl]

Issues warning messages on empty declarations. Equivalent to

  #pragma 

  warn_emptydecl

  

[no]possible | [no]unwanted

Issues warning messages on possible unwanted effects. Equivalent to

  #pragma 

  warn_possunwanted

  

[no]unusedarg

Issues warning messages on unused arguments. Equivalent to

  #pragma 

  warn_unusedarg

  

[no]unusedvar

Issues warning messages on unused variables. Equivalent to

  #pragma 

  warn_unusedvar

  

[no]unused

Same as

  -w [no]unusedarg,[no]unusedvar
  
  

[no]extracomma | [no]comma

Issues warning 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

  

[no]pedantic | [no]extended

Pedantic error checking.

[no]hidevirtual | [no]hidden[virtual]

Issues warning messages on hidden virtual functions. Equivalent to

  #pragma 

  warn_hidevirtual

  

[no]implicit[conv]

Issues warning messages on implicit arithmetic conversions. Implies

  -warn impl_float2int,impl_signedunsigned
  
  

[no]impl_int2float

Issues warning messages on implicit integral to floating conversions. Equivalent to

  #pragma 

  warn_impl_i2f_conv

  

[no]impl_float2int

Issues warning messages on implicit floating to integral conversions. Equivalent to

  #pragma 

  warn_impl_f2i_conv

  

[no]impl_signedunsigned

Issues warning messages on implicit signed/unsigned conversions.

[no]relax_i2i_conv

Issues warnings for implicit integer to integer arithmetic conversions (off for full, on otherwise).

[no]notinlined

Issues warning messages for functions declared with the inline qualifier that are not inlined. Equivalent to

  #pragma 

  warn_notinlined

  

[no]largeargs

Issues warning messages when passing large arguments to unprototyped functions. Equivalent to

  #pragma 

  warn_largeargs

  

[no]structclass

Issues warning messages on inconsistent use of class and struct. Equivalent to

  #pragma 

  warn_structclass

  

[no]padding

Issue warning messages when padding is added between struct members. Equivalent to

  #pragma 

  warn_padding

  

[no]notused

Issues warning messages when the result of non-void-returning functions are not used. Equivalent to

  #pragma 

  warn_resultnotused

  

[no]missingreturn

Issues warning messages when a return without a value in non-void-returning function occurs. Equivalent to

  #pragma 

  warn_missingreturn

  

[no]unusedexpr

Issues warning messages when encountering the use of expressions as statements without side effects. Equivalent to

  #pragma 

  warn_no_side_effect

  

[no]ptrintconv

Issues warning messages when lossy conversions occur from pointers to integers.

[no]anyptrintconv

Issues warning messages on any conversion of pointers to integers. Equivalent to

  #pragma 

  warn_ptr_int_conv

  

[no]undef[macro]

Issues warning messages on the use of undefined macros in #if and #elif conditionals. Equivalent to

  #pragma 

  warn_undefmacro

  

[no]filecaps

Issues warning messages when # include "" directives use incorrect capitalization. Equivalent to

  #pragma 

  warn_filenamecaps
  
  

[no]sysfilecaps

Issues warning messages when # include <> statements use incorrect capitalization. Equivalent to

  #pragma 

  warn_filenamecaps_system

  

[no]tokenpasting

Issues warning messages when token is not formed by the ## preprocessor operator. Equivalent to

  #pragma 

  warn_illtokenpasting

  

[no]alias_ptr_conv

Generates the warnings for potentially dangerous pointer casts.

display | dump

Displays list of active warnings.