C/C++ Programmer's Guide (G06.27+, H06.08+, J06.03+)
• If the specified file is an existing error file with file code 106, the compiler replaces the contents
of the existing file with the new error file.
• If the specified file is an existing file but is not an error file, the compiler terminates and displays
the message:
ERRORFILE not created
• The error file contains one record for each error or warning message that the compiler found
during compilation. Each error record contains:
◦ The fully qualified, local file name of the file in which the compiler found the error or
warning
◦ If you specified a DEFINE name for the name of the source file, the name of the file to
which the DEFINE evaluated appears in this entry
◦ The EDIT line number in which the error or warning occurred
◦ The column number in the line where the compiler detected the error/warning
◦ The error or warning message text
ERRORS
The ERRORS pragma directs the compiler to terminate compilation if it detects more than a specified
number of errors.
ERRORS max-errors
max-errors
specifies the maximum number of errors that the compiler is to generate before terminating the
compilation.
The pragma default settings are:
SYSTYPE OSSSYSTYPE GUARDIAN
Not set for C N.A. for C++Not set for C N.A. for C++TNS C compiler
Not set for C N.A. for C++Not set for C N.A. for C++G-series TNS c89 utility
ERRORS 100ERRORS 100TNS/R native C and C++ compilers
ERRORS 100ERRORS 100Native c89 and c99 utilities
ERRORS 100ERRORS 100TNS/E native C and C++ compilers
Usage Guidelines
• The ERRORS pragma can be entered on the compiler RUN command line (not in the source
file) or be specified with the -Werrors flag of the c89 or the c99 utility.
• If you do not use the ERRORS pragma, the TNS C compiler completes a compilation regardless
of the number of errors it diagnoses.
EXCEPTION_SAFE_SETJMP
The EXCEPTION_SAFE_SETJMP pragma directs the compiler to do special processing for calls to
Standard C API setjmp. This enables setjmp/longjmp to be used with C++ exception handling.
This option is valid only for TNS/R C/C++.
186 Compiler Pragmas