C/C++ Programmer's Guide (G06.25+)
HP C/C++ Programmer’s Guide for NonStop Systems—429301-008
1-1
1
Introduction to HP C and C++ for
NonStop Systems
•
TNS C Language System on page 1-1
•
TNS C++ Language System on page 1-3
•
TNS/R Native C and C++ Language System on page 1-4
•
Features of TNS/R Native C and C++ on page 1-10
•
TNS/E Native C and C++ Language System on page 1-12
•
Features of TNS/E Native C and C++ on page 1-17
•
Writing Portable Programs on page 1-19
•
Porting Programs to HP C and C++ for NonStop Systems on page 1-21
•
Porting Without Data Alignment Problems on page 1-22
•
Guardian and OSS Environment Interoperability on page 1-22
TNS C Language System
The HP TNS C language system for NonStop servers generates TNS C programs for
the Guardian and G-series OSS environments. The C preprocessor, C compiler, C run-
time library, and Binder comprise the TNS C language system. Optional components of
this system include the Accelerator, the TNS Object Code Accelerator (OCA), the
Inspect or Visual Inspect symbolic debuggers, and the NonStop SQL/MP compiler.
HP C for NonStop systems conforms to the C language standard as set forth in
ISO/IEC 9899:1990, Programming Languages–C. (This is technically identical to ANSI
C X3.159-1989, Programming Language C.) HP C includes several extensions to
ISO/ANSI Standard C that makes C an effective language for writing applications that
run on NonStop systems. For details, see Section 2, C and C++ Extensions.
C Preprocessor
The C preprocessor, Cprep, manipulates the text of a source file as the first phase of
compilation. You can run Cprep as an independent process in either the Guardian or
OSS environment. The C preprocessor is embedded in the C compiler that runs in the
Guardian environment. The C compiler that runs in the OSS environment does not
contain the C preprocessor; Cprep must be run separately. (The OSS TNS c89 utility
runs the C preprocessor by default.)
C Compiler
The C compiler then translates C source text into machine language code. If there are
mistakes in your program, then error messages are generated; if not, object code is
generated.