C/C++ Programmer's Guide (G06.25+)

TNS C++ Implementation-Defined Behavior
HP C/C++ Programmer’s Guide for NonStop Systems429301-008
B-5
Pragma SYSTYPE
to run in the other environment and describes the differences that exist between an
executable C++ program file in the two environments.
Pragma SYSTYPE
The pragma SYSTYPE specifies whether a C++ program is targeted to run in the OSS
or the Guardian environment.
The Guardian version of Cfront defaults to generating code that is targeted for the
Guardian environment. However, when the pragma SYSTYPE OSS is specified, the
Guardian version of Cfront generates code targeted for the OSS environment.
The OSS version of Cfront defaults to generating code that is targeted for the OSS
environment. However, when the pragma SYSTYPE GUARDIAN is specified, the OSS
version of Cfront generates code targeted for the Guardian environment.
Data Models
C++ programs that are generated with the OSS version of Cfront always use the 32-bit
data model. Under the 32-bit data model the size of type int is 32 bits. C++ programs
that are generated with the Guardian version of Cfront also default to the 32-bit data
model. Therefore, the data models will be compatible unless you specify the NOWIDE
pragma when compiling the Guardian version. The NOWIDE pragma specifies the 16-
bit data model, where the size of type int is 16 bits.
If 16-bit and 32-bit data are both required, you might want to avoid type int and use
types short and long instead.
Run-Time Libraries
The OSS environment has only one C++ run-time library, libC.a.
The Guardian environment has two run-time libraries. LIBCA is used with the 32-bit
data model. LIBLA is used with the 16-bit data model.
Applicable Pragmas
In the OSS environment, the C compiler ignores the following pragmas:
ANSISTREAMS, RUNNABLE, SEARCH, SSV, STDFILES, and XVAR.
For additional information on writing programs for the OSS environment, see
Section 14, Compiling, Binding, and Accelerating TNS C Programs, and Section 15,
Compiling, Binding, and Accelerating TNS C++ Programs.