C/C++ Programmer's Guide (G06.27+, H06.08+, J06.03+)

For TNS C and C++, pragmas ENV LIBRARY and ENV LIBSPACE restrict relocatable data
blocks. Without relocatable data blocks, static data is not allowed. Therefore, 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 more details, see the pragma CSADDR (page 182).
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.
ERRORFILE { filename | define-name }
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:
SYSTYPE OSSSYSTYPE GUARDIAN
Not setNot setTNS C compiler
Not setNot setG-series TNS c89 utility
Not setNot setTNS/R native C and C++ compilers
N.A.N.A.Native c89 and c99 utilities
Not setNot setTNS/E native C and C++ compilers
Usage Guidelines
The ERRORFILE pragma can appear only on the RUN command line (not in the source file)
for NMC or NMCPLUS (G-series Guardian) or for CCOMP or CPPCOMP (H-series or J-series
Guardian).
The effect of the ERRORFILE pragma can be achieved with the 2> operand of the c89 or
the c99 utility.
If the specified disk file does not already exist, the compiler creates an entry-sequenced file
(file code 106) using the specified file name.
ERRORFILE 185