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

Table Of Contents
Compiler Pragmas
HP C/C++ Programmer’s Guide for NonStop Systems429301-010
13-116
XMEM
Programs composed of Guardian modules (modules compiled for the Guardian
environment) and OSS modules (modules compiled for the OSS environment)
must use the 32-bit data model.
For more details about the two data models, see Two Data Models: 16-Bit and 32-
Bit on page 19-9.
The preprocessor variable __INT32 is defined when the WIDE pragma is in effect.
XMEM
The XMEM pragma controls which memory model, large or small, the object file uses.
The XMEM pragma specifies the large-memory model. NOXMEM specifies the small-
memory model.
The pragma default settings are:
Usage Guidelines
The XMEM pragma can be entered on the compiler RUN command line or at the
start of the source text before any declarations or source code statements.
The native C and C++ compilers do not support the XMEM pragma. Native
compilers generate only programs that use the large-memory model.
The NOXMEM pragma cannot be used if the pragma SYSTYPE OSS is specified. The
compiler issues a warning.
The NOXMEM pragma compiles only under the 16-bit data model. The combination
of the WIDE and NOXMEM pragmas is diagnosed as an error.
All translation units of a program must specify the same memory model.
For more details about the two memory models, see Two Memory Models: Large
and Small on page 19-7.
The preprocessor variable __XMEM is defined when the XMEM pragma is in effect.
[NO]XMEM
SYSTYPE GUARDIAN SYSTYPE OSS
TNS C compiler XMEM XMEM
TNS c89 utility XMEM XMEM
G-series TNS c89 utility N.A N.A
TNS/R native C and C++ compilers N.A N.A
Native c89 utility N.A. N.A.