# Compiler Diagnostic Options

This section contains descriptions for compiler options that pertain to compiler diagnostics.

Parent topic: Compiler Option Details

- diag, Qdiag
  Controls the display of diagnostic information during compilation.
- diag-dump, Qdiag-dump
  Tells the compiler to print all enabled diagnostic messages.
- diag-enable=power, Qdiag-enable:power
  Controls whether diagnostics are enabled for possibly inefficient code that may affect power consumption on IA-32 and Intel® 64 architectures.
- diag-error-limit, Qdiag-error-limit
  Specifies the maximum number of errors allowed before compilation stops.
- diag-file, Qdiag-file
  Causes the results of diagnostic analysis to be output to a file.
- diag-file-append, Qdiag-file-append
  Causes the results of diagnostic analysis to be appended to a file.
- diag-id-numbers, Qdiag-id-numbers
  Determines whether the compiler displays diagnostic messages by using their ID number values.
- diag-once, Qdiag-once
  Tells the compiler to issue one or more diagnostic messages only once.
- fnon-call-exceptions
  Allows trapping instructions to throw C++ exceptions.
- traceback
  Tells the compiler to generate extra information in the object file to provide source file traceback information when a severe error occurs at run time.
- 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.
- Wbrief
  Tells the compiler to display a shorter form of diagnostic output.
- Wcheck
  Tells the compiler to perform compile-time code checking for certain code.
- Wcomment
  Determines whether a warning is issued when /* appears in the middle of a /* */ comment.
- Wcontext-limit, Qcontext-limit
  Set the maximum number of template instantiation contexts shown in diagnostic.
- wd, Qwd
  Disables a soft diagnostic. This is a deprecated option. The replacement option is [Q]diag-disable.
- Wdeprecated
  Determines whether warnings are issued for deprecated C++ headers.
- we, Qwe
  Changes a soft diagnostic to an error. This is a deprecated option. The replacement option is [Q]diag-error.
- 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.
- Wic-pointer
  Determines whether warnings are issued for conversions between pointers to distinct scalar types with the same representation.
- Winline
  Warns when a function that is declared as inline is not inlined.
- WL
  Tells the compiler to display a shorter form of diagnostic output.
- 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.
- wn, Qwn
  Controls the number of errors displayed before compilation stops. This is a deprecated option. The replacement option is [Q]diag-error-limit.
- Wnon-virtual-dtor
  Tells the compiler to issue a warning when a class appears to be polymorphic, yet it declares a non-virtual one.
- wo, Qwo
  Tells the compiler to issue one or more diagnostic messages only once. This is a deprecated option. The replacement option is [Q]diag-once id.
- Wp64
  Tells the compiler to display diagnostics for 64-bit porting.
- Wpch-messages
  Determines whether the compiler shows precompiled header (PCH) informational messages.
- Wpointer-arith
  Determines whether warnings are issued for questionable pointer arithmetic.
- Wport
  Tells the compiler to issue portability diagnostics.
- wr, Qwr
  Changes a soft diagnostic to an remark. This is a deprecated option. The replacement option is [Q]diag-remark.
- Wremarks
  Tells the compiler to display remarks and comments.
- 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.
- ww, Qww
  Changes a soft diagnostic to an warning. This is a deprecated option. The replacement option is [Q]diag-warning.
- Wwrite-strings
  Issues a diagnostic message if const char * is converted to (non-const) char *.