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-64
NEUTRAL
Usage Guidelines
For the TNS C compiler, the NEST pragma can be entered on the compiler RUN
command line or in the source text. For OSS, the pragma can be entered only in
the source file.
The native C and C++ compilers do not support the NEST pragma. The ISO/ANSI
C Standard does not support nested comments.
Example
In this example, the NEST pragma enables a single pair of comment symbols to delimit
three source lines that themselves contain comments:
#pragma NEST
/*
r = 20; /* initialize r */
r_squared = r*r; /* square x */
area = 3.14*r_squared; /* compute the circle's area */
*/
NEUTRAL
The NEUTRAL pragma is only supported for use within HP NonStop system header
files for TNS/E. It controls whether a struct, class, or union definition is
considered as part of the C++ CPPNEUTRAL dialect and marks it as being available in
the neutral C++ standard library. This pragma is not recognized by the TNS/R compiler.
There is no default setting for this pragma.
Usage Guidelines
The NEUTRAL pragma cannot appear on the RUN command line for CCOMP or
CPPCOMP (NonStop NS-series Guardian). This pragma can only appear in the
source code.
Only the NEW, EXCEPTION, and TYPEINFO headers are in the CPPNEUTRAL
dialect. These headers define these functions:
The new/delete family of storage allocation classes.
class type_info()
set_unexpected()
set_new_handler()
set_terminate()
class exception()
NEUTRAL