C/C++ Programmer's Guide (G06.25+)
Compiler Pragmas
HP C/C++ Programmer’s Guide for NonStop Systems—429301-008
13-20
ENV
COMMON
specifies that the module requires the Common Run-Time Environment (CRE).
The module can be called by routines written in any language that runs in the CRE.
Use this option for user code functions that run in the CRE.
For the native C and C++ compilers, this option sets the _COMMON feature-test
macro.
EMBEDDED
specifies that the module does not require resources provided by the CRE and that
it meets the requirements to run in the system code space.
The module can be called from routines written in any language, regardless of
whether the routines run in the CRE. Use this option for user code functions that
do not rely on run-time libraries. It is intended for system-level programming. For
additional considerations, see Section 9, System-Level Programming.
You must verify that code does not use the C run-time library and other CRE
resources. The compiler performs no verification. Specifying ENV EMBEDDED does
not make code that uses the C run-time library and other CRE resources able to
run in the system code space.
For the native C and C++ compilers, this option sets the _EMBEDDED feature-test
macro.
LIBRARY
specifies that the module requires the CRE and that the module meets the
requirements to run in the user library space.
The module can be called by routines written only in C or C++. Use this option for
TNS user library functions. Do not use this option for native user library functions.
TNS user library programs can call a very limited number of C run-time library
functions. Specifically, TNS user library programs cannot call functions that require
relocatable data blocks (global data). Native user library programs can call the
entire C run-time library.
For the native C and C++ compilers, this option sets the _LIBRARY feature-test
macro.
LIBSPACE
specifies that the module does not require resources provided by the CRE and that
it meets the requirements to run in the user library space or system library space.
You must verify that code does not use the C run-time library and other CRE
resources. The compiler performs no verification. Specifying ENV LIBSPACE does
not make code that uses the C run-time library and other CRE resources able to
run in the user library space or system library space.