–q options syntax

The following principles apply to the use of z/OS® option names with -q syntax:

Options that do not exist on AIX, and are not required to accomplish a z/OS-specific task, and their effect can be accomplished by other means, are not supported with -q syntax. For example, use -D instead of DEFINE, -U instead of UNDEFINE, and -co instead of OBJECT.

Suboptions with negative forms of -q options are not supported, unless they cause an active compiler action, as in the case of -qnokeyword=<keyword>.

Compiler options for AIX that do not apply to z/OS are accepted and ignored with a diagnostic message. For a brief description of the compiler options that can be specified with xlc, type xlc or any other supported command name. For detailed descriptions of the compiler options that can be specified with xlc, refer to Compiler options.

The following syntax diagram shows how to specify keyword options using -q syntax:

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

In the diagram, option_keyword is an option name and the optional suboption is a value associated with the option. Keyword options with no suboptions represent switches that may be either on or off. The option_keyword by itself turns the switch on, and the option_keyword preceded by the letters NO turns the switch off. For example, -qLIST tells the compiler to produce a listing and -qNOLIST tells the compiler not to produce a listing. If an option that represents a switch is set more than once, the compiler uses the last setting.

Some keyword options only have values. Keywords which have values are specified as keyword=value pairs. In -qfloat=ieee, for instance, ieee is a value.

Some keyword options have suboptions, which in turn have values. Suboptions which have values are specified as suboption=value pairs. In -qipa=level=2, for instance, level is a suboption and 2 is a value.

Keyword options and suboptions may appear in mixed case letters in the command that invokes the xlc utility. Keyword options that have suboptions can also be preceded by the letters NO in which case they are similar to off switches and do not allow suboptions. This is a noticeable departure from the z/OS options, which allow suboptions even if they are preceded by the letters NO. However, the function that the z/OS behavior provides can easily be emulated by specifying all required suboptions with an option_keyword followed by the same option_keyword that is preceded by the letters NO. The subsequent specification of the same option_keyword unlocks all previously specified suboptions.

Example: NODEBUG(FORMAT(DWARF)) is equivalent to -qdebug=format=dwarf -qnodebug

The compiler recognizes all AIX -q options, but only those that have a matching z/OS native option are accepted and processed. All other AIX -q options are ignored with an informational message.

Note: The GENASM compiler option is not supported with -q syntax. Use the -S flag option instead, which is described in Flag options syntax.