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

cprep/in progcp, out intfile1/define __cplusplus, &
SSV0 "$system.system"
cfront/in intfile1, out intfile2/
c/in intfile2, out $s.#hold/progo
To run this program, enter:
run progo
The program will respond with:
Hello World
Error Messages in the Guardian Environment
This subsection provides information on the compile-time and run-time error messages that are
generated in the Guardian environment.
Compile-Time Error Messages
Cprep and Cfront generate completion codes and send error and warning messages to stderr.
Cprep and Cfront each follow the standard HP convention of generating completion codes to
indicate the presence of error or warning messages. The completion codes have these significance:
SignificanceCompletion Code
Compilation completed with warnings, but no errors.1
Errors occurred, and processing terminated.2
If you are running Cprep or Cfront interactively, these completion codes appear on your terminal
screen as a source of information. For example, if Cfront encounters errors and stops processing,
it will emit this message:
2: Process terminated with fatal errors or diagnostics
If you are running in batch mode, Cprep and Cfront sends completion codes to the command
interpreter. You can use TACL to check for these completion codes. For an example of how to
check for these completion codes, see the TACL macro in Appendix B: TNS C++
Implementation-Defined Behavior.
Cprep and Cfront both send error and warning messages to stderr. The default location for
stderr is the terminal. You can assign stderr to a specific file and collect all Cprep and Cfront
error and warning messages there. The messages generated by Cfront contain (CFRONT): at the
start of the message.
The total count of errors and warnings appears as a comment after the error and warning messages.
Cprep's error and warning messages that appear in stderr are a subset of those of the TNS C
compiler. For descriptions of the TNS C compiler error and warning messages, see Chapter 20:
TNS C Compiler Messages.
Once Cfront recognizes errors, it stops emitting source code, and after a maximum of 13 errors,
it stops compiling. When Cfront stops compiling, it terminates with the message Process
terminated with fatal errors or diagnostics. Cfront's error and warning messages
that appear in stderr are self-explanatory.
Run-Time Error Messages
C++ uses the TNS C run-time library. For a description of the TNS C run-time error messages, see
Chapter 20: TNS C Compiler Messages.
280 Compiling, Binding, and Accelerating TNS C++ Programs