-qsource

Category

Listings, messages, and compiler information

Pragma equivalent

#pragma options [no]source

Purpose

Produces a compiler listing file that includes the source section of the listing and provides additional source information when printing error messages.

When source is in effect, a listing file is generated with a .lst suffix for each source file named on the command line. For details of the contents of the listing file, see Compiler listings.

Syntax

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

Defaults

-qnosource

Usage

You can selectively print parts of the source 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.

The -qnoprint option overrides this option.

Predefined macros

None.

Examples

To compile myprogram.c to produce a compiler listing that includes the source code, enter:
xlc myprogram.c -qsource

Related information