C/C++ Programmer's Guide (G06.25+)

Compiler Pragmas
HP C/C++ Programmer’s Guide for NonStop Systems429301-008
13-64
NEST
MIGRATION_CHECK must be used with the VERSION2 command-line directive. If
it is used with VERSION1 or VERSION3 (or if no version is specified), the following
error is output to the home terminal and to the compilation listing if it is enabled:
***Error: MIGRATION_CHECK option only allowed with version2.
The source code to be analyzed must be error-free, valid VERSION2 C++ source.
No migration check is available for migrating from VERSION1 to VERSION3.
Required source code changes might be either trivial or significant in migrating
from VERSION2 to VERSION3.
For example, many components available in the VERSION2 library are also
available in VERSION3, sometimes by different name. Some components dont
exist in VERSION3, but many of these can be easily built using VERSION3
components.
Examples
To run a migration check on OSS:
c89 -Wversion2 -Wmigration_check -Wnosuppress myprog.cpp
To run a migration check on G-series Guardian:
nmcplus / in myprogc, out $s.#list / ; version2,
migration_check
To run a migration check on H-series Guardian:
cppcomp / in myprogc, out $s.#list / ; version2,
migration_check
NEST
The NEST pragma controls whether the compiler accepts nested comments. The NEST
pragma directs the compiler to accept nested comments, recursively pairing begin-
comment symbols (/*) with end-comment symbols (*/). NONEST directs the compiler not
to accept nested comments.
The pragma default settings are:
[NO]NEST
SYSTYPE GUARDIAN SYSTYPE OSS
TNS C compiler NONEST NONEST
G-series TNS c89 utility NONEST NONEST
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.