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-108
VERSION2
°
LIBCOBEY for a TNS/R program (an OBEY file that links the C run-time library
and the Common Run-Time Environment [CRE])
VERSION1 supports version 6.1 of Tools.h++.
To use the Tools.h++ library (version 6.1) when using VERSION1, you need to link
ZTLHGSRL (the Guardian Tools.h++ library) or ZTLHOSRL (the OSS Tools.h++
library). If you are compiling a loadfile (using RUNNABLE in Guardian), you can link
to Tools.h++ by specifying the correct SRL in a LINKFILE pragma or by using the
-Wnld_obey option to c89 in OSS.
For more details about SRLs, see Shared Run-Time Libraries (SRLs) on
page 16-13.
VERSION2
The VERSION2 pragma is a command-line directive for native mode C++ that instructs
the C++ compiler to compile using the dialect or features available beginning with the
D45 version of the HP C++ language. This pragma is not accepted by the TNS
compilers.
The pragma default settings are:
Usage Guidelines
You can enter the VERSION2 directive on the compiler RUN command line when
specifying NMCPLUS or CPPCOMP on Guardian environment, or using the -
Wversion2 flag when specifying c89 in the OSS environment. You cannot enter
the VERSION2 directive in the source file.
VERSION2 supports DLLs (Dynamic-Link Libraries) and Position-Independent
Code (PIC).
Using the VERSION2 directive enables you to use these language features of the
native C++ compiler:
°
Exception handling
VERSION2
SYSTYPE GUARDIAN SYSTYPE OSS
TNS C compiler N.A. N.A.
G-series TNS c89 utility N.A. N.A.
TNS/R native C and C++ compilers VERSION3 for C++,
N.A. for C
VERSION3 for C++,
N.A. for C
Native c89 utility VERSION3 for C++,
N.A. for C
VERSION3 for C++,
N.A. for C
TNS/E native C and C++ compilers VERSION3 for C++,
N.A. for C
VERSION3 for C++,
N.A. for C