diag-file, Qdiag-file

Causes the results of diagnostic analysis to be output to a file.

IDE Equivalent

Windows: Diagnostics > Diagnostics File
Linux: None
Mac OS X: Diagnostics > Diagnostics File

Architectures

IA-32 architecture, Intel® 64 architecture, IA-64 architecture

Syntax

Linux and Mac OS X:  -diag-file[=file]
Windows:  /Qdiag-file[:file]

Arguments

file Is the name of the file for output.

Default

OFF Diagnostic messages are output to stderr.

Description

This option causes the results of diagnostic analysis to be output to a file. The file is placed in the current working directory.

If file is specified, the name of the file is file.diag. The file can include a file extension; for example, if file.ext is specified, the name of the file is file.ext.

If file is not specified, the name of the file is name-of-the-first-source-file.diag. This is also the name of the file if the name specified for file conflicts with a source file name provided in the command line.

Note

If you specify -diag-file (Linux and Mac OS X) or /Qdiag-file (Windows) and you also specify -diag-file-append (Linux and Mac OS X) or /Qdiag-file-append (Windows), the last option specified on the command line takes precedence.

Alternate Options

None

Example

The following example shows how to cause diagnostic analysis to be output to a file named stat_ver.diag:

-diag-file=stat_ver       ! Linux and Mac OS X systems
/Qdiag-file:stat_ver      ! Windows systems
 

See Also

diag, Qdiag compiler option

diag-file-append, Qdiag-file-append compiler option