C/C++ Programmer's Guide (G06.25+)
Compiler Pragmas
HP C/C++ Programmer’s Guide for NonStop Systems—429301-008
13-65
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 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.
There is no default setting for this pragma.
Usage Guidelines
•
The NEUTRAL pragma cannot appear on the RUN command line for CCOMP or
CPPCOMP (H-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 the following functions:
The new/delete family of storage allocation classes.
class type_info()
set_unexpected()
set_new_handler()
set_terminate()
class exception()
class bad_alloc()
class bad_cast()
NEUTRAL