C/C++ Programmer's Guide (G06.25+)
Compiler Pragmas
HP C/C++ Programmer’s Guide for NonStop Systems—429301-008
13-22
ERRORFILE
•
For TNS C and C++, pragmas ENV LIBRARY and ENV LIBSPACE restrict
relocatable data blocks. Without relocatable data blocks, static data is not allowed.
Thus, the compiler allocates constants (including character string constants and
data declared with a const type qualifier) in the user code space instead of the
user or system data space. Because the constants are in the user code space, you
cannot pass pointers to these constants between code spaces without using the
CSADDR pragma. For details, see the pragma CSADDR on page 13-18.
•
The compiler does not identify the use of restricted C I/O or memory allocation run-
time functions. Use of restricted functions causes a failure when the function is
executed.
•
The compiler identifies the use of restricted static variables.
•
For native C and C++, pragmas ENV LIBRARY and ENV LIBSPACE causes the
compiler to place literal constants into the read-only data area. It also causes an
error to be generated for global variable declarations.
•
Functions in object files listed in SEARCH pragmas retain their original ENV
attributes.
•
To use C run-time library functions affected by locales and the CHECK pragma
under pragmas ENV EMBEDDED and ENV LIBSPACE, you must specify pragma
NOCHECK and the _IGNORE_LOCALE feature-test macro in the compilation text to
refer to the environmentally neutral variants of the functions.
ERRORFILE
The ERRORFILE pragma directs the compiler to send error and warning messages to a
specified file location.
filename
is the name of the error-logging file. It must be a disk file name.
define-name
is the name of a MAP DEFINE that refers to a disk file. The compiler uses the disk
file as the error-logging file.
The pragma default settings are:
ERRORFILE { filename | define-name }
SYSTYPE GUARDIAN SYSTYPE OSS
TNS C compiler Not set Not set
G-series TNS c89 utility Not set Not set