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

TNS/E Native C Compiler
The TNS/E 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).
For H06.08 and later H-series RVUs and J06.03 and later J-series RVUs, selected features
from the 1999 update to this standard (ISO/IEC 9899:1999) (see Appendix G: c99 Selected
Features (C99LITE), for a summary of these features).
NOTE: To use the supported features from the 1999 standard, you must specify the C99LITE
pragma on the compiler command line (Guardian) or the -Wc99lite option on the c89
command (OSS, Windows).
For H06.21 and later H-series RVUs and J06.10 and later J-series RVUs, for TNS/E native
applications that use IEEE floating point, all features from the 1999 update to this standard (ISO/IEC
9899:1999). Complex types and several new math functions and macros are not supported for
Tandem floating point format, but all other c99 features are available when compiled using the
Tandem floating point format option. For more information about this support, see “c99 Full Support”
(page 461).
NOTE: To use these features:
When compiling on Guardian, use the C99 option of the CCOMP command to enable
compiling to the 1999 standard (for example CCOMP/ in filec/;c99. The default is to
compile according to the 1989 standard.
When compiling on OSS and Windows, use c89 to compile using the 1989 standard or use
c99 to compile using the 1999 standard.
HP NonStop extensions that support the native architecture.
The TNS/E native C compiler can be run in the Guardian and OSS environments, and on a PC
using the NonStop Development Environment for Eclipse (NSDEE) or ETK:
In the Guardian environment, use the CCOMP command to run the TNS/E native compiler.
The CCOMP command-line syntax is similar to that of the NMC command for running the
TNS/R C compiler. For syntax information, see Compiling a C Module (page 263).
In the OSS environment, use the native c89 utility or the c99 utility to run the TNS/E native
C compiler. For syntax information, see the c89(1) or the c99(1) reference page either
online or in the Open System Services Shell and Utilities Reference Manual. The Open System
Services Programmer’s Guide provides guidance on the use of C in the OSS environment.
On a PC running the Windows operating system, use NSDEE or ETK to compile C code. You
can also use the command-line cross compiler (named c89) outside NSDEE and ETK. For more
details, see the NSDEE online help, the ETK online help, or the file “Using the Command-Line
Cross Compilers on Windows” installed with ETK compiler package.
The TNS/E native C compiler supports programs that define the size of pointers and type int as
32 bits (programs compiled with the pragma WIDE). Existing TNS C language programs that
define pointers or type int as 16 bits must be changed. Few other C language source code
changes are required to use the native C compiler.
TNS/E Native C++ Compiler
TNS/E native C++ compiler accepts one of two dialects of the C++ language; both versions accept
C++ language source files and support HP language extensions. However, the versions support
different standards as described in the descriptions of pragmas VERSION2 (page 254) and
VERSION3 (page 255).
TNS/E Native C and C++ Language System 39