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.

More inlining will improve application performance and increase application<br />

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

information on the INLINE compiler option.<br />

Example: The following is an example of a compile with optimization with<br />

no report generated, a threshold of 500 abstract code units, and a limit of<br />

2500 abstract code units:<br />

c89 -o outfile -O2 -Wc,’inline(auto,noreport,500,2500)’ file.c<br />

When using IPA, the default is -O (level 1) optimization and inlining. IPA<br />

optimization is independent from and can be specified in addition to this<br />

optimization level. IPA is further described under the -W option on page 78.<br />

If compiling with PDF, the same optimization level must be used in the<br />

PDF1 and PDF2 steps.<br />

If you compile your program to take advantage of dbx source-level<br />

debugging and specify –g (see the -g option on page 72), you will always<br />

get -0 (level zero) optimization regardless of which of these compiler<br />

optimization levels you specify.<br />

In addition to using optimization techniques, you may want to control<br />

writable strings by using the #pragma strings(readonly) directive or the<br />

R<strong>OS</strong>TRING compiler option. As of z/<strong>OS</strong> Version 1 Release 2, R<strong>OS</strong>TRING<br />

is the default.<br />

For more information on this topic, see reentrancy in z/<strong>OS</strong> XL C/C++ in<br />

z/<strong>OS</strong> XL C/C++ Programming Guide or the description of the R<strong>OS</strong>TRING<br />

option in the z/<strong>OS</strong> XL C/C++ User’s Guide.<br />

-o outfile<br />

Specifies the name of the c89/cc/c++ output file.<br />

If the -o option is specified in addition to the –c option, and only one source<br />

file is specified, then this option specifies the name of the output file<br />

associated with the one source file. See file.o under “Operands” on page 81<br />

for information on the default name of the output file.<br />

Otherwise the -o option specifies the name of the executable file produced<br />

during the link-editing phase. The default output file is a.out.<br />

-p Ignored by cc. Provided for compatibility with historical implementations of<br />

cc. Flagged as an error by c89 and c++.<br />

-q Ignored by cc. Provided for compatibility with historical implementations of<br />

cc. Flagged as an error by c89 and c++.<br />

-r Specifies that c89/cc/c++ is to save relocation information about the object<br />

files which are processed. When the output file (as specified on –o) is<br />

created, it is not made an executable file. Instead, this output file can later<br />

be used as input to c89/cc/c++. This can be used as an alternative to an<br />

archive library.<br />

IPA Usage Note:<br />

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

When using -r and link-editing IPA compiled object files, you must link-edit<br />

with IPA (see the description of IPA under the -W option). However, the -r<br />

option is typically not useful when creating an IPA optimized program. This<br />

is because link-editing with IPA requires that all of the program information<br />

is available to the link editor (that is, all of the object files). It is not<br />

Chapter 2. Shell command descriptions 75

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

Saved successfully!

Ooh no, something went wrong!