-fsyntax-only (-qsyntaxonly)
Category
Pragma equivalent
None.
Purpose
Performs syntax checking without generating an object file.
Syntax
>>- -f--syntax-only--------------------------------------------><
>>- -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