-fsyntax-only (-qsyntaxonly)

Pragma equivalent

None.

Purpose

Performs syntax checking without generating an object file.

Syntax

Read syntax diagramSkip visual syntax diagram
>>- -f--syntax-only--------------------------------------------><

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 -fsyntax-only (-qsyntaxonly) option, which in turn overrides the -c and -o options.

The -fsyntax-only (-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 -fsyntax-only

Related information



Voice your opinion on getting help information Ask IBM compiler experts a technical question in the IBM XL compilers forum Reach out to us