Intel® Fortran Compiler XE 13.1 User and Reference Guides
Controls the display of diagnostic information.
Windows: Diagnostics > Disable Specific Diagnostics (/Qdiag-disable:id)
Diagnostics > Level of Static Analysis (/Qdiag-enable:sc{1|2|3})
Diagnostics > Mode of Static Analysis (/Qdiag-enable:sc-{full|concise|precise})
Linux: None
OS X: Diagnostics > Disable Specific Diagnostics (-diag-disable id)
All
Linux and OS X: | -diag-type diag-list |
Windows: | /Qdiag-type:diag-list |
type |
Is an action to perform on diagnostics. Possible values are:
|
||||||||||||||||||||||||
diag-list |
Is a diagnostic group or ID value. Possible values are:
The diagnostic messages generated can be affected by certain options, such as /arch or /Qx (Windows) or -m or -x (Linux and OS X). |
OFF |
The compiler issues certain diagnostic messages by default. |
This option controls the display of diagnostic information. Diagnostic messages are output to stderr unless compiler option -diag-file (Linux* OS and OS X*) or /Qdiag-file (Windows* OS) is specified.
When diag-list value "warn" is used with static analysis diagnostics, the following behavior occurs:
Option -diag-enable warn (Linux OS) and /Qdiag-enable:warn (Windows OS) enable all diagnostics except those that have an "error" severity level. They enable all static analysis warnings, cautions, and remarks.
Option -diag-disable warn (Linux OS) and /Qdiag-disable:warn (Windows OS) disable all static analysis diagnostics except those that have an "error" severity level. They suppress all static analysis warnings, cautions, and remarks.
The following table shows more information on values you can specify for diag-list item sc and sc-mode. These items are not available on OS X* systems.
diag-list Item |
Description |
|
|---|---|---|
|
sc[n] |
The value of n for static analysis messages can be any of the following: |
|
1 |
Reports only diagnostics with a severity level of "critical". Diagnostics with a severity level of "error" or "warning" are not displayed. | |
2 |
Reports all diagnostics with a severity level of "critical" and "error". Diagnostics with a severity level of "warning" are not reported. This is the default. | |
3 |
Reports all diagnostics regardless of the severity level. | |
sc-mode |
The value of mode for static analysis messages can be any of the following: |
|
full |
This mode attempts to find all program weaknesses, even at the expense of more false positives. This mode is recommended when using the tool for security assurance. This is the default if -diag-enable sc{[1|2|3]} (Linux* OS and OS X*) or /Qdiag-enable:sc{[1|2|3]} (Windows* OS) is present. Otherwise, the default is None (static analysis diagnostics are disabled). |
|
concise |
This mode attempts to reduce false positives somewhat more than reducing false negatives. This mode is recommended when using the tool for general error detection. |
|
precise |
This mode attempts to avoid all false positives, even at the expense of substantially reduced error checking. This mode is recommended when using the tool for acceptance screening. |
|
To disable static analysis, specify /Qdiag-disable:sc (Windows* OS) or option -diag-disable sc (Linux* OS).
To control the diagnostic information reported by the vectorizer, use the -vec-report (Linux OS and OS X) or /Qvec-report (Windows OS) option.
To control the diagnostic information reported by the auto-parallelizer, use the -par-report (Linux OS and OS X) or /Qpar-report (Windows OS) option.
enable vec |
Linux and OS X: -vec-report Windows: /Qvec-report |
disable vec |
Linux and OS X: -vec-report0 Windows: /Qvec-report0 |
enable par |
Linux and OS X: -par-report Windows: /Qpar-report |
disable par |
Linux and OS X: -par-report0 Windows: /Qpar-report0 |
The following example shows how to enable diagnostic IDs 117, 230 and 450:
-diag-enable 117,230,450 ! Linux and OS X systems
/Qdiag-enable:117,230,450 ! Windows systems
The following example shows how to change vectorizer diagnostic messages to warnings:
-diag-enable vec -diag-warning vec ! Linux and OS X systems
/Qdiag-enable:vec /Qdiag-warning:vec ! Windows systems
Note that you need to enable the vectorizer diagnostics before you can change them to warnings.
The following example shows how to disable all auto-parallelizer diagnostic messages:
-diag-disable par ! Linux and OS X systems
/Qdiag-disable:par ! Windows systems
The following example shows how to change all diagnostic warnings and remarks to errors:
-diag-error warn,remark ! Linux and OS X systems
/Qdiag-error:warn,remark ! Windows systems
The following example shows how to produce static analysis diagnostic messages for all critical errors:
-diag-enable sc1 ! Linux systems
/Qdiag-enable:sc1 ! Windows systems
The following example shows how to cause static analysis diagnostics (and default diagnostics) to be sent to a file:
-diag-enable sc -diag-file=stat_ver_msg ! Linux systems
/Qdiag-enable:sc /Qdiag-file:stat_ver_msg ! Windows systems
Note that you need to enable static analysis diagnostics before you can send them to a file. In this case, the diagnostics are sent to file stat_ver_msg.diag. If a file name is not specified, the diagnostics are sent to name-of-the-first-source-file.diag.