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

TNS/E Native C and C++ Migration Tool
The native C and C++ migration tool, NMCMT, scans source files and produces a diagnostic
listing. The listing identifies most C and C++ language source code changes required to migrate
from TNS C (D20 or later product versions) to native C or C++.
The native mode migration tool is available in both the Guardian and OSS environments, and it
is integrated into ETK on the PC.
TNS/E Code Profiling Utilities
The TNS/E Code Profiling Utilities provide these capabilities:
Evaluate the code coverage provided by application test cases. The utilities use information
provided by a specially-instrumented object file to produce a report that indicates which
functions and basic blocks were executed, and how many times each was executed.
Optimize an application through a process called profile-guided optimization. In profile-guided
optimization, a specially-instrumented object file is executed to produce a data file containing
information about the execution path of the program. That data file, along with the original
source code, is then input to the compiler to generate more efficient object code.
Using the Code Profiling Utilities requires a special compilation to produce an object file containing
the required instrumentation. To create such an object file, specify the CODECOV or PROFGEN
option on the compiler command line. Several other compiler options are also related to code
profiling. These are the PROFDIR, PROFUSE, and BASENAME options.
The Code Profiling Utilities can be used only with native TNS/E applications.
NOTE: The Code Profiling Utilities are intended for data generation and collection in a test
environment only. The use of instrumented object code is not recommended for production
environments. Applications compiled with code profiling instrumentation will experience greatly
reduced performance.
For details on using the Code Profiling Utilities, see the Code Profiling Utilities Manual.
Features of TNS/E Native C and C++
Beginning with the H06.01 RVU, TNS/E native C and C++ provides:
The language as defined by The Annotated C++ Reference Manual by Ellis and Stroustrup
(excluding support for exception handling).
The language specification in the 1996 X3J16/WG21 Working Paper. VERSION2 of the
native C++ compiler is based on the 1996 standard, including support for exceptions and
features that are not in the The Annotated C++ Reference Manual but are new in the working
paper. A summary of those major features appears in the description of pragma VERSION2
(page 254). A list of specific features accepted from the working paper appears in Appendix E:
Features and Keywords of Version 2 Native C++.
VERSION3 of the native C++ compiler, which is based on the 1998 standard. VERSION3 is
the default library used by the native C++ compiler.
This manual is not intended to be a reference manual for ANSI C or for C++. For a complete
description of ANSI C, see ANSI X3.159. For a complete description of C++, see ANSI
X3J16/96-0225 (VERSION2) and ISO/IEC 14882:1998(E) (VERSION3).
Useful references on C and C++ include:
ANSI C, American National Standards Institute. ANSI X3.159-1989.
Ellis, Margaret A. and Stroustrup, Bjarne. The Annotated C++ Reference Manual. Addison
Wesley, 1990.
ISO/IEC. Programming Languages C. International Standard ISO/IEC 9899. First edition
1990-12-15.
TNS/E Native C and C++ Language System 43