Option Type | Default Value | #pragma options | C | C++ |
-qoption | nosrcmsg | SRCMSG | x |
Syntax
-qsrcmsg | -qnosrcmsg SRCMSG | NOSRCMSG
Purpose
Adds the corresponding source code lines to the diagnostic messages in the stderr
file.
Notes
The compiler reconstructs the source line or partial source line to which the
diagnostic message refers and displays it before the diagnostic message. A pointer to the
column position of the error may also be displayed. Specifying -qnosrcmsg
suppresses the generation of both the source line and the finger line, and the error
message simply shows the file, line and column where the error occurred.
The reconstructed source line represents the line as it appears after macro expansion. At times, the line may be only partially reconstructed. The characters "...." at the start or end of the displayed line indicate that some of the source line has not been displayed.
The default (nosrcmsg) displays concise messages that can be parsed. Instead of giving the source line and pointers for each error, a single line is displayed, showing the name of the source file with the error, the line and character column position of the error, and the message itself.
Example
To compile myprogram.c so that the source line is displayed along with the diagnostic
message when an error occurs, enter:
xlC myprogram.c -qsrcmsg
List of Batch Compiler Options and Their Defaults
Options that Specify Compiler Output
Equivalent Batch Compile-Link and Incremental
Build Options