Compiler Diagnostic Options
- w
Disables all warning messages.
- w, W
Specifies the level of diagnostic messages to be generated by the compiler.
- Wabi
Determines whether a warning is issued if generated code is not C++ ABI compliant.
- Wall
Enables warning and error diagnostics.
- Wcomment
Determines whether a warning is issued when /* appears in the middle of a /* */ comment.
- Wdeprecated
Determines whether warnings are issued for deprecated C++ headers.
- Weffc++, Qeffc++
Enables warnings based on certain C++ programming guidelines.
- Werror, WX
Changes all warnings to errors.
- Werror-all
Causes all warnings and currently-enabled remarks to be reported as errors.
- Wextra-tokens
Determines whether warnings are issued about extra tokens at the end of preprocessor directives.
- Wformat
Determines whether argument checking is enabled for calls to printf, scanf, and so forth.
- Wformat-security
Determines whether the compiler issues a warning when the use of format functions may cause security problems.
- Wmain
Determines whether a warning is issued if the return type of main is not expected.
- Wmissing-declarations
Determines whether warnings are issued for global functions and variables without prior declaration.
- Wmissing-prototypes
Determines whether warnings are issued for missing prototypes.
- Wpointer-arith
Determines whether warnings are issued for questionable pointer arithmetic.
- Wreorder
Tells the compiler to issue a warning when the order of member initializers does not match the order in which they must be executed.
- Wreturn-type
Determines whether warnings are issued when a function is declared without a return type, when the definition of a function returning void contains a return statement with an expression, or when the closing brace of a function returning non-void is reached.
- Wshadow
Determines whether a warning is issued when a variable declaration hides a previous declaration.
- Wsign-compare
Determines whether warnings are issued when a comparison between signed and unsigned values could produce an incorrect result when the signed value is converted to unsigned.
- Wstrict-aliasing
Determines whether warnings are issued for code that might violate the optimizer's strict aliasing rules.
- Wstrict-prototypes
Determines whether warnings are issued for functions declared or defined without specified argument types.
- Wtrigraphs
Determines whether warnings are issued if any trigraphs are encountered that might change the meaning of the program.
- Wuninitialized
Determines whether a warning is issued if a variable is used before being initialized.
- Wunknown-pragmas
Determines whether a warning is issued if an unknown #pragma directive is used.
- Wunused-function
Determines whether a warning is issued if a declared function is not used.
- Wunused-variable
Determines whether a warning is issued if a local or non-constant static variable is unused after being declared.
- Wwrite-strings
Issues a diagnostic message if const char * is converted to (non-const) char *.