-qsource

Description

Produces a compiler listing and includes source code.

Syntax

Read syntax diagramSkip visual syntax diagram        .-nosource-.
>>- -q--+-source---+-------------------------------------------><

See also #pragma options.

Notes

The -qnoprint option overrides this option.

Parts of the source can be selectively printed by using pairs of #pragma options source and #pragma options nosource preprocessor directives throughout your source program. The source following #pragma options source and preceding #pragma options nosource is printed.

Examples

To compile myprogram.C to produce a compiler listing that includes the source for myprogram.C, enter:

xlc++ myprogram.C -qsource

Do not use the -qsource compiler option if you want the compiler listing to show only selected parts of your program source. The following code causes the source found between the #pragma options source and #pragma options nosource directives to be included in the compiler listing:

#pragma options source
   . . .
/* Source code to be included in the compiler listing
   is bracketed by #pragma options directives.
*/
   . . .
#pragma options nosource

Related information