-q options

Read syntax diagramSkip visual syntax diagram
>>- -q--option_keyword--+------------------+-------------------><
                        |    .-:---------. |   
                        |    V           | |   
                        '-=----suboption-+-'   

Command-line options in the -qoption_keyword format are similar to on and off switches. For most -q options, if a given option is specified more than once, the last appearance of that option on the command line is the one recognized by the compiler. For example, -qsource turns on the source option to produce a compiler listing, and -qnosource turns off the source option so no source listing is produced. For example:
xlc -qnosource MyFirstProg.c -qsource MyNewProg.c

would produce a source listing for both MyNewProg.c and MyFirstProg.c because the last source option specified (-qsource) takes precedence.

You can have multiple -qoption_keyword instances in the same command line, but they must be separated by blanks. Option keywords can appear in either uppercase or lowercase, but you must specify the -q in lowercase. You can specify any -qoption_keyword before or after the file name. For example:
xlc -qLIST -qfloat=nomaf file.c
xlc file.c -qxref -qsource

You can also abbreviate many compiler options. For example, specifying -qopt is equivalent to specifying -qoptimize on the command line.

Some options have suboptions. You specify these with an equal sign following the -qoption. If the option permits more than one suboption, a colon (:) must separate each suboption from the next. For example:
xlc -qflag=w:e -qattr=full file.c

compiles the C source file file.c using the option -qflag to specify the severity level of messages to be reported. The -qflag suboption w (warning) sets the minimum level of severity to be reported on the listing, and suboption e (error) sets the minimum level of severity to be reported on the terminal. The -qattr with suboption full will produce an attribute listing of all identifiers in the program.