Compiler Diagnostic Options
- diag, Qdiag
Controls the display of diagnostic information.
- diag-dump, Qdiag-dump
Tells the compiler to print all enabled diagnostic messages and stop compilation.
- diag-enable sc, Qdiag-enable:sc
Enables static analysis diagnostics. You can determine which diagnostics to emit based on severity or you can specify an analysis mode for diagnostic messages.
- diag-enable sc-enums, Qdiag-enable:sc-enums
Tells static analysis to treat enumeration variables as known values equal to any one of the associated enumeration literals.
- diag-enable sc-include, Qdiag-enable:sc-include
Tells a source code analyzer to process include files and source files when issuing diagnostic messages.
- diag-enable sc-single-file, Qdiag-enable:sc-single-file
Tells static analysis to process each file individually.
- 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.
- diag-sc-dir, Qdiag-sc-dir
Specifies a directory for static analysis results.
- 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.
- Wdeprecated
Determines whether warnings are issued for deprecated features.
- we, Qwe
Changes a soft diagnostic to an error. This is a deprecated option.
- 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.
- Winline
Enables diagnostics about what is inlined and what 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.
- 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.
- Wp64
Tells the compiler to display diagnostics for 64-bit porting.
- Wpointer-arith
Determines whether warnings are issued for questionable pointer arithmetic.
- Wport
Tells the compiler to issue portability diagnostics.
- Wpragma-once
Determines whether a warning is issued about the use of #pragma once.
- wr, Qwr
Changes a soft diagnostic to an remark. This is a deprecated option.
- 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 uses the default int return type or when a return statement is used in a void function.
- 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.
- Wwrite-strings
Issues a diagnostic message if const char * is converted to (non-const) char *.