C/C++ Programmer's Guide (G06.27+, H06.03+)

Table Of Contents
Compiling, Binding, and Accelerating TNS C++
Programs
HP C/C++ Programmer’s Guide for NonStop Systems429301-010
15-3
Working in the Guardian Environment
C Preprocessor Cprep
Cprep is a general-purpose C preprocessor. Cprep performs these functions:
Expands all preprocessor directives
Uses certain C compiler pragmas and passes the rest to Cfront for the C compiler
Generates #line directives specifying original C++ source file and edit line
number
Produces a TNS C++ source file that is the input for Cfront
Expansion of Preprocessor Directives
Cprep includes files as directed by #include directives and SSV compiler pragmas. If
any SSV compiler pragmas are specified, they must appear on the Cprep run
command line. In addition, Cprep expands all the preprocessor directives.
C Compiler Pragmas Used by Cprep
Cprep recognizes certain C compiler pragmas. These pragmas are used by Cprep and
where relevant they are passed through. These pragmas must appear on the Cprep
run command line or in the C++ source code. Cprep recognizes these pragmas.
Table 15-1 lists the C compiler pragmas used by Cprep.
All other C compiler pragmas are passed through to the file created by Cprep and are
used by the C compiler.
The TNS C++ translator, Cfront, is WIDE by default. The TNS C compiler is effectively
NOWIDE by default. To compile TNS C++ programs that use the 32-bit data model for
the Guardian environment, specify pragma WIDE in the C++ source file or on the TNS
C++ preprocessor, Cprep, run command line.
For a complete description of all the C compiler pragmas, see Section 13, Compiler
Pragmas.
Table 15-1. C Compiler Pragmas Used by Cprep
[NO]CHECK RUNNABLE
COLUMNS SECTION
(source code only)
ERRORS SS
V (command line only)
[NO]NEST [NO]WARN
[NO]OLDCALLS [NO]WIDE