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-115
WIDE
Examples
1. In this example, the compiler generates only warning messages 153 and 157.
#pragma nowarn
#pragma warn (153,157)
2. In this example, the compiler generates all warning messages except warning 153.
#pragma nowarn (153)
WIDE
The WIDE pragma specifies the data model, which defines the size of the data type
int. The WIDE pragma specifies the 32-bit data model. NOWIDE specifies the 16-bit
data model. (The 32-bit data model is also referred to as the wide-data model.)
The pragma default settings are:
Usage Guidelines
The WIDE pragma can be entered on the compiler RUN command line or in the
source text.
The TNS C++ translator, Cfront, is WIDE by default. The TNS C compiler is
effectively NOWIDE by default. To compile TNS C++ programs for the Guardian
environment that use the 32-bit data model, specify pragma WIDE in the C++
source file or on the TNS C++ preprocessor, Cprep, run command line.
In source text, the WIDE pragma must be specified before any declarations or
source code statements.
The native C and C++ compilers do not support these pragmas. Native compilers
generate only programs that use the 32-bit data model.
The WIDE pragma compiles only under the large-memory model. The combination
of the WIDE and NOXMEM pragmas is diagnosed as an error.
All translation units of a program must specify the same data model.
[NO]WIDE
SYSTYPE GUARDIAN SYSTYPE OSS
TNS C compiler Not set WIDE
G-series TNS c89 utility WIDE WIDE
TNS/R native C and C++ compilers N.A N.A.
Native c89 utility N.A N.A
TNS/E native C and C++ compilers N.A N.A