-qsyntaxonly

Category

Error checking and debugging

Pragma equivalent

None.

Purpose

Performs syntax checking without generating an object file.

Syntax

Read syntax diagramSkip visual syntax diagram
>>- -q--syntaxonly---------------------------------------------><

Defaults

By default, source files are compiled and linked to generate an executable file.

Usage

The -P, -E, and -C options override the -qsyntaxonly option, which in turn overrides the -c and -o options.

The -qsyntaxonly option suppresses only the generation of an object file. All other files, such as listing files, are still produced if their corresponding options are set.

Predefined macros

None.

Examples

To check the syntax of myprogram.c without generating an object file, enter:
xlc myprogram.c -qsyntaxonly

Related information