16.12.2012 Views

z/OS V1R9.0 UNIX System Services Command ... - Christian Grothoff

z/OS V1R9.0 UNIX System Services Command ... - Christian Grothoff

z/OS V1R9.0 UNIX System Services Command ... - Christian Grothoff

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Table 35. Compiler option conflict resolution (continued)<br />

-qpath -B| -t -qpath overrides -B and -t<br />

In general, if more than one variation of the same option is specified (with the<br />

exception of xref and attr), the compiler uses the setting of the last one specified.<br />

Compiler options specified on the command line must appear in the order you want<br />

the compiler to process them.<br />

If a command-line flag is valid for more than one compiler program (for example -B,<br />

-W, or -I applied to the compiler, binder, and assembler program names), you must<br />

specify it in options, or asopt in the configuration file. The command-line flags must<br />

appear in the order that they are to be directed to the appropriate compiler<br />

program.<br />

Three exceptions to the rules of conflicting options are the -Idirectory or<br />

-I//dataset_name, -llibrary, and -Ldirectory options, which have cumulative effects<br />

when they are specified more than once.<br />

Specifying compiler options on the command line<br />

There are two kinds of command-line options:<br />

v -qoption_keyword (compiler-specific)<br />

v Flag options (available to z/<strong>OS</strong> XL C/C++ compilers in z/<strong>OS</strong> <strong>UNIX</strong> <strong>System</strong><br />

Service environment)<br />

<strong>Command</strong>-line options in the -q option_keyword format are similar to on and off<br />

switches. For most -q options, if a given option is specified more than once, the last<br />

appearance of that option on the command line is the one recognized by the<br />

compiler. For example, qsource turns on the source option to produce a compiler<br />

listing, and -qnosource turns off the source option so that no source listing is<br />

produced.<br />

Example: The following example would produce a source listing for both<br />

MyNewProg.C and MyFirstProg.C because the last source option specified<br />

(-qsource) takes precedence:<br />

xlC -qnosource MyFirstProg.C -qsource MyNewProg.C<br />

You can have multiple -q option_keyword instances in the same command line, but<br />

they must be separated by blanks. Option keywords can appear in mixed case, but<br />

you must specify the -q in lowercase.<br />

Example: You can specify any -q option_keyword before or after the file name:<br />

xlC -qLIST -qnomaf file.c<br />

xlC file.c -qxref -qsource<br />

xlc and xlC<br />

Some options have suboptions. You specify these with an equal sign following the<br />

-qoption. If the option permits more than one suboption, a colon (:) must separate<br />

each suboption from the next.<br />

Example: The following example compiles the C source file file.c using the option<br />

-qipa to specify the inter procedural analysis options. The suboption level=2 tells<br />

the compiler to use the full inter procedural data flow and alias analysis, map tells<br />

the compiler to produce a report, and the noobj tells the compiler to produce only<br />

an IPA object without a regular object. The option -qattr with suboption full will<br />

produce an attribute listing of all identifiers in the program.<br />

Chapter 2. Shell command descriptions 813

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!