TNS/R Native Application Migration Guide

Introduction to Native Mode
TNS/R Native Application Migration Guide523745-001
1-6
Native C Compiler
Native C Compiler
The native C compiler accepts C language source files that comply with either the
ISO/ANSI C Standard or Common Usage C (sometimes called Kernighan and
Ritchie C or K&R C). The native C compiler also accepts HP language extensions.
The native C compiler can be run in the Guardian and OSS environments and on the
PC as part of ETK or TDS. The NMC command runs the compiler in the Guardian
environment. The native C compiler command line syntax is similar to that of the TNS
C compiler. The native c89 utility runs the compiler in the OSS environment. The
native c89 utility syntax is similar to that of the TNS c89 utility.
Both ETK and TDS enable you to compile and link programs on a PC (for details, see
the C/C++ Programmer’s Guide). You can copy these programs to a NonStop system
and execute them in the Guardian and OSS environments.
The 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.
The native mode C and C++ migration tool, NMCMT, scans source files and produces
a diagnostic listing. The listing identifies most C language source code changes
required to migrate from TNS C (D20 or later product versions) to native C.
Native C++ Compiler
The native C++ compiler accepts C++ language source files. The native C++ compiler
accepts most C++ features in the ANSI base document for the proposed C++ standard
(excluding exception handling) and HP language extensions.
The native C++ compiler can be run in the Guardian and OSS environments and on
the PC as part of ETK or TDS. The NMCPLUS command runs the compiler in the
Guardian environment. The native C++ compiler command line syntax is similar to that
of the TNS C compiler and Cfront. The native c89 utility runs the compiler in the OSS
environment and on the PC. The native c89 utility syntax is similar to that of the TNS
c89 utility.
Both ETK and TDS enable you to compile and link programs on a PC (for details, see
the C/C++ Programmer’s Guide). You can copy these programs to a NonStop system
and execute them in the Guardian and OSS environments.
The native C++ compiler supports programs that define the size of type int as 32 bits
(programs compiled with the pragma WIDE). Existing TNS C++ language programs
that define the type int as 16 bits must be changed. Few other C++ language source
code changes are required to use the native C++ compiler.