C/C++ Programmer's Guide (G06.25+)
Compiler Pragmas
HP C/C++ Programmer’s Guide for NonStop Systems—429301-008
13-107
VERSION2
These language features are part of the proposed C++ standard introduced by the
Working Paper for Draft Proposed International Standard for Information Systems
– Programming Language C++, 2 December 1996, X3J6/96-0225 WG21/N1043.
If you want to use any of these VERSION2 features in an application originally
compiled with any pre-D45 RVU of the TNS/R native C++ compiler, you must
recompile and relink all modules of the program using the VERSION2 directive.
•
Object files compiled using VERSION2 take advantage of the features available
beginning at the D45 RVU and are incompatible with object files compiled using
earlier or later versions of the native C++ compiler.
°
If you compile an application composed of multiple modules, you must compile
all modules using the same version directive.
For example, if you use the VERSION2 directive to compile any module of a
program, you must compile all modules of the program using the VERSION2
directive.
°
The linkers issue an error if you attempt to link several C++ modules that were
compiled with different version directives.
°
You can disable version checking by designating a loadfile CPPNEUTRAL using
a linker utility. For details, see the eld Manual, the ld Manual, or the nld
Manual.
•
You must use the VERSION2 command-line directive in order to use the following
middleware products:
°
Version 2 of the Standard C++ Library. See Section 5, Using the Standard C++
Library.
°
Version 7 of Tools.h++. See Section 6, Accessing Middleware Using HP C and
C++ for NonStop Systems
•
VERSION2 supports IEEE floating-point format.
•
VERSION2 supports Version 7 of Tools.h++ and version 2 of the Standard C++
Library.)
•
In the G06.20 RVU, all the native C++ header files were combined into one product
number. These headers were modified to identify the version used in the compile
and to redirect calls to the correct library.
•
If you include the RUNNABLE option when compiling VERSION2 on Guardian (or if
you do not include -c on OSS), the compiler automatically links:
°
ZCPLSRL (C++ run-time library)
°
ZRWSLSRL (Standard C++ Library, VERSION2)
°
LIBCOBEY for a TNS/R program (an OBEY file that links the C run-time library
and the Common Run-Time Environment [CRE])
°
CPPINIT.O (non-PIC), or CPPINIT2.O for CALL_SHARED (TNS/R PIC)
(allows you to override the new and delete functions)