C/C++ Programmer's Guide (G06.25+)
Compiler Pragmas
HP C/C++ Programmer’s Guide for NonStop Systems—429301-008
13-104
VERSION1
Usage Guidelines
•
The TRIGRAPH pragma can be entered on the compiler RUN command line or in
the source text.
•
The native C and C++ compilers do not support this pragma. Native compilers
always translate trigraphs.
VERSION1
The VERSION1 pragma is a command-line directive for TNS/R native mode C++ that
instructs the C++ compiler to compile using the D40 version or dialect of C++, rather
than a more recent version. This pragma is not accepted by the TNS or TNS/E
compilers.
The pragma default settings are:
Usage Guidelines
•
As of G06.20, the default for native mode C++ compilation is VERSION3 (not
VERSION1). If you are going to recompile an application that used the previous
default (VERSION1), you must specify the VERSION1 pragma. See also
VERSION2 on page 13-106 and VERSION3 on page 13-108.
•
You can enter the VERSION1 directive on the compiler RUN command line when
specifying NMCPLUS on Guardian, or using the -Wversion1 flag when specifying
c89 on OSS. You cannot enter the VERSION1 directive in the source file.
•
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. Additionally, the linkers and the
NonStop operating system perform version checking. Attempting to mix
VERSION3 with either of the other versions will yield an error (for link files) or a
VERSION1
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