C/C++ Programmer's Guide (G06.27+, H06.08+, J06.03+)
The pragma default settings are:
SYSTYPE OSSSYSTYPE GUARDIAN
N.A.N.A.TNS C compiler
N.A.N.A.G-series TNS c89 utility
VERSION3 for C++ N.A. for CVERSION3 for C++ N.A. for CTNS/R native C and C++ compilers
VERSION3 for C++ N.A. for CVERSION3 for C++ N.A. for CNative c89 utility
VERSION3VERSION3c99 utility
VERSION3 for C++ N.A. for CVERSION3 for C++ N.A. for CTNS/E native C and C++ compilers
Usage Guidelines
• You can enter the VERSION3 directive on the compiler RUN command line when specifying
CPPCOMP or NMCPLUS on Guardian environment, or using the -Wversion3 flag of the
c89 or the c99 utility in the OSS environment. You cannot enter the VERSION3 directive in
the source file.
• VERSION3 is the default version of the native C++ compiler for the G06.20 RVU and for
subsequent RVUs until a new version of the compiler is released.
• If you specify no version directive (or if you include the VERSION3 directive) with the G06.20
native C++ compiler, you will produce a binary that is compatible with binaries produced by
the G06.20 compiler but not the D45 compiler (VERSION2) or any earlier compiler.
• The VERSION3 directive specifies the use of the Standard C++ Library ISO/IEC version 3,
and the C++ Standard headers. VERSION3 enforces the ISO/IEC IS 14882:1998 standard
for C++. The ISO C++ standard is identical to the ANSI C++ standard. The VERSION3
Standard C++ Library ISO/IEC is combined with the C++ run-time library into one public SRL
(named ZSTLSRL) on systems running G-series RVUs but is separated into three component
libraries (ZCPPCDLL, ZCPP2DLL, and ZCPP3DLL) on systems running H-series RVUs or J-series
RVUs to implement the BUILD_NEUTRAL_LIBRARY pragma.
For more details about the VERSION3 Standard C++ Library, see the Standard C++ Library
Reference ISO/IEC (VERSION3) on the product documentation CD, the HP NonStop Technical
Library (NTL).
• VERSION3 supports IEEE floating-point format.
• VERSION3 supports DLLs (Dynamic-Link Libraries) and Position-Independent Code (PIC).
• VERSION3 does not support any version of the Tools.h++ library.
• All modules of an application must be built using the same version of the Standard C++ Library.
For example, you must compile all modules using the same version directive (VERSION1,
VERSION2, or VERSION3). Mixing versions within an application can cause unpredictable
results.
Beginning at G06.20, the native linkers enforce non-mixing of versions. The ld and nld
linkers issue a warning if you attempt to link modules compiled with VERSION1 and VERSION2.
An error is issued by nld if VERSION3 is mixed with either VERSION1 or VERSION2. In
addition, eld and ld issue an error on any VERSION1 linkfile in addition to any mixing of
VERSION2 with VERSION3.
You can build a neutral C++ dialect DLL using the BUILD_NEUTRAL_LIBRARY pragma.
256 Compiler Pragmas