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

In the Guardian environment, support is also provided for:
Mixed language programming using interface declarations
Completion codes for error detection
Exception Handling Is Not Supported
Exception handling is described in The Annotated C++ Reference Manual. However, exception
handling is not implemented in either USL Cfront or HP Cfront.
Compilation Steps for C++ Code
To compile C++ code in the Guardian and OSS environments, use these steps:
1. Run the Cprep preprocessor to provide macro and file expansion. The C preprocessor produces
C++ source code for input to Cfront.
2. Run the Cfront translator to translate the C++ source code and produce C source code for
input to the C compiler.
3. Run the C compiler to produce C object code that, when bound with the C++ run-time library
and the C run-time library, produces an executable C++ program.
4. You can optionally process the executable C++ program with the Accelerator or OCA.
In the Guardian environment, you can use a TACL macro to run the compilation system components.
In the OSS environment, the G-series TNS c89 utility (/nonnative/bin/c89) provides an
interface to the C++ compilation system components. For more details, see Chapter 15: Compiling,
Binding, and Accelerating TNS C++ Programs.
TNS/R Native C and C++ Language System
The TNS/R native C and C++ language system generates TNS/R native C and C++ programs for
the Guardian and OSS environments.
Components of this language system:
TNS/R Native C Compiler (page 32)
TNS/R Native C++ Compiler (page 33)
TNS/R Native C Run-Time Library (page 34)
C++ Run-Time Library and Standard C++ Library (page 34)
TNS/R Native Linkers (nld and ld Utilities) (page 35)
Optional components:
Inspect Symbolic Debugger (page 35)
Visual Inspect Symbolic Debugger (page 35)
NonStop SQL/MP Compiler and NonStop SQL/MX Compiler (page 36)
TNS/R Native C and C++ Migration Tool (page 36)
TNS/R Native C Compiler
The TNS/R native C compiler accepts C language source files that comply with the ISO/ANSI C
Standard (ISO/IEC 9899:1990, Programming Languages–C or ANSI C X3.159-1989,
Programming Language C) or Common-Usage C (sometimes called Kernighan and Ritchie C, or
K&R C). The native C compiler also accepts HP NonStop extensions that support the native
architecture.
32 Introduction to HP C and C++ for NonStop Systems