PPONLY | NOPPONLY
Category
Compiler output
Pragma equivalent
None.
Purpose
Specifies that only the preprocessor is to be run and not the compiler.
When the PPONLY compiler option is in effect, the output of the preprocessor consists of the original source file with all the macros expanded and all the include files inserted. It is in a format that can be compiled.
When the NOPPONLY compiler option is in effect, both the preprocessor and the compiler are used to compile the source file.
Syntax
Defaults
NOPPONLY
For the z/OS® UNIX System Services utilities, the default for a regular compile is NOPPONLY(NOCOMMENTS, NOLINES, /dev/fd1, 2048).
In the z/OS UNIX System Services environment, this option is turned on by specifying the -E flag option when using the c89 utility to invoke the compiler. When using the xlc utility, this option can be turned on by specifying the -E or -P flag options, or by specifying the -qpponly compiler option in a manner similar to specifying the PPONLY option in JCL or TSO compiler invocations.
Parameters
- COMMENTS | NOCOMMENTS
- The COMMENTS suboption preserves comments in the preprocessed output. The default is NOCOMMENTS.
- LINES | NOLINES
- The LINES suboption issues
#line
directives at include file boundaries, block boundaries and where there are more than 3 blank lines. The default is NOLINES. - filename
- The name for the preprocessed output file. The filename may
be a data set or a z/OS UNIX file. If you do not specify
a file name for the PPONLY option, the
SYSUT10
ddname is used if it has been allocated. IfSYSUT10
has not been allocated, the file name is generated as follows:- If a data set is being compiled, the name of the preprocessed
output data set is formed using the source file name. The high-level
qualifier is replaced with the userid under which the compiler is
running, and
.EXPAND
is appended as the low-level qualifier. - If the source file is a z/OS UNIX file, the preprocessed
output is written to a z/OS UNIX file that has the source
file name with
.i
extension.
Note: If you are using the xlc utility and you do not specify the file name, the preprocessed output goes tostdout
. If -E or -P is also specified, the output file is determined by the -E option. The -E flag option maps toPP(stdout)
. -P maps to PP(default_name). default_name is constructed using the source file name as the base and the suffix is replaced with the appropriate suffix, as defined by theisuffix
,isuffix_host
,ixxsuffix
, andixxsuffix_host
configuration file attributes. See xlc — Compiler invocation using a customizable configuration file for further information on the xlc utility. - If a data set is being compiled, the name of the preprocessed
output data set is formed using the source file name. The high-level
qualifier is replaced with the userid under which the compiler is
running, and
- n
- If a parameter n, which is an integer
between 2 and 32752 inclusive, is specified, all lines are
folded at column n. The default for n is
72. Note: If the PPONLY output is directed into an existing file, and n is larger than the maximum record length of the file, then all lines are folded to fit into the output file, based on the record length of the output file.
*
- If an asterisk (*) is specified, the lines are folded at the maximum record length of 32752. Otherwise, all lines are folded to fit into the output file, based on the record length of the output file.
Usage
PPONLY output is typically requested when reporting a compiler problem to IBM using a Problem Management Record (PMR), so your build process should be able to produce a PPONLY file on request.
PPONLY
also removes conditional compilation constructs like #if
,
and #ifdef
.
The PPONLY suboptions are cumulative. If you specify suboptions in multiple instances of PPONLY and NOPPONLY, all the suboptions are combined and used for the last occurrence of the option.
CXX HELLO (NOPPONLY(./aa.exp) PPONLY(LINES) PPONLY(NOLINES)
CXX HELLO (PPONLY(./aa.exp,LINES,NOLINES)
CXX HELLO (PPONLY(./aa.exp,NOLINES)
All #line
and #pragma preprocessor
directives (except for margins
and sequence
directives)
remain. When you specify PPONLY(*), #line
directives
are generated to keep the line numbers generated for the output file
from the preprocessor similar to the line numbers generated for the
source file. All consecutive blank lines are suppressed.
If you specify the PPONLY option, the compiler turns on the TERMINAL option. If you specify the SHOWINC, XREF, AGGREGATE, or EXPMAC options with the PPONLY option, the compiler issues a warning, and ignores the options.
??=pragma filetag ("locale code page")
In
this example, ??=
is a trigraph representation of
the #
character.The code page in the pragma is the code set that is specified in the LOCALE option. See Introduction to locale in z/OS XL C/C++ Programming Guide for more information.
If you specify both PPONLY and NOPPONLY, the last one that is specified is used.
stdout
when using the c89 utility because
the PPONLY option can only be turned on by specifying the -E flag
option. These limitations do not exist when using the xlc utility
because the PPONLY option can be specified in addition to the -E,
-P and -C flag options (for example, -qpponly=foo.pp:comments:nolines:65
).
Predefined macros
None.