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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

c89, cc, and c++<br />

You can specify an MVS data set name as an include file search directory.<br />

Also, MVS data set names can explicitly be specified on #include<br />

directives. You can indicate both by specifying a leading double slash (//).<br />

Example: To include the include file DEF that is a member of the MVS PDS<br />

ABC.HDRS, code your C or C++ source as follows:<br />

#include <br />

MVS data set include files are handled according to z/<strong>OS</strong> XL C/C++<br />

compiler conversion rules (see Usage Note 4 on page 98). When specifying<br />

an #include directive with a leading double slash (in a format other than<br />

#include and #include), the specified name<br />

is paired only with MVS data set names specified on the -I option. That is,<br />

when you explicitly specify an MVS data set name, any z/<strong>OS</strong> <strong>UNIX</strong> file<br />

system directory names specified on the -I option are ignored.<br />

-L directory<br />

Specifies the directories to be used to search for archive libraries specified<br />

by the -l operand. The directories are searched in the order specified,<br />

followed by the usual places. You cannot specify an MVS data set as an<br />

archive library directory.<br />

For information on specifying C370LIB libraries, see the description of the -l<br />

libname operand. Also see Usage Note 7 on page 99 for a description of<br />

the usual places.<br />

-0, -O (-1), -2, -3<br />

Specifies the level of compiler optimization (including inlining) to be used.<br />

The level -1 (number one) is equivalent to -O (capital letter O). The level -3<br />

gives the highest level of optimization. The default is -0 (level zero), no<br />

optimization and no inlining, when not using IPA (Interprocedural Analysis).<br />

When optimization is specified, the default is ANSIALIAS. The ANSIALIAS<br />

default specifies whether type-based aliasing is to be used during<br />

optimization. That is, the optimizer assumes that pointers can only be used<br />

to access objects of the same type. Type-based aliasing improves<br />

optimization. Applications that use pointers that point to objects of a<br />

different type will need to specify NOANSIALIAS when the optimization<br />

compiler option is specified. If your application works when compiled with<br />

no optimization and fails when compiled with optimization, then try<br />

compiling your application with both optimization and NOANSIALIAS<br />

compiler options. The z/<strong>OS</strong> XL C/C++ User’s Guide contains more<br />

information on ANSIALIAS.<br />

Notes:<br />

1. Options can also be specified as -O1 (using capital letter O), -O2, and<br />

-O3. For further information, see Usage Note 12 on page 100.<br />

2. These options cannot be overridden by specifying optimization options<br />

using the -Wc syntax. This behavior differs from the behavior of the xlc<br />

utility, which allows the use of -q and -Wc syntax to override the flag<br />

optimization options.<br />

Example: The following is an example of a compile with the highest level of<br />

optimization and no type-based aliasing:<br />

c89 -o outfile -O3 -Wc,NOANSIALIAS file.c<br />

74 z/<strong>OS</strong> <strong>V1R9.0</strong> <strong>UNIX</strong> <strong>System</strong> <strong>Services</strong> <strong>Command</strong> Reference<br />

When optimization is specified, you may want to obtain a report on the<br />

amount of inlining performed and increase or decrease the level of inlining.

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

Saved successfully!

Ooh no, something went wrong!