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

Components of the TNS c89 Utility
The TNS c89 utility enables you to compile ISO-compliant C programs for NonStop environment.
By default, c89 generates code for the OSS environment. c89 provides a simple interface to the
components of the C compilation system:
C language preprocessor
The preprocessor manipulates the text of the source file to prepare it for the C compiler,
including the insertion of function prototypes from the specified header files.
C compiler
The compiler translates the source text into object code.
Binder
The Binder resolves external references to library routines and performs fixups to the object
file.
Accelerator
The Accelerator generates RISC instructions from the TNS object file.
SQL/MP compiler
This compiler generates the appropriate code for embedded SQL/MP statements.
Using the TNS c89 Utility
Control TNS c89 with flags and operands. Flags direct c89 to initiate tasks, such as compiling a
source file. Flags are also used to change the settings of components controlled by c89, such as
to direct the C compiler to generate symbolic information used in debugging. Operands are the
objects acted on or used by the components controlled by c89, such as source files to compile or
library files to search when resolving external references. The simplified syntax of the TNS c89
utility is:
c89 [flag...] operand...
flag
is a valid c89 utility flag.
operand
is a valid c89 utility operand.
Table 36 summarizes commonly used operands.
Table 36 Commonly Used TNS c89 Operands
Specify this operandTo specify this type of file
filename.cA C source file
filename.oAn object file
Table 37 summarizes commonly used TNS c89 flags and describes equivalent Guardian
environment actions.
Table 37 Commonly Used TNS c89 Flags and Guardian Environment Equivalents
Equivalent Guardian environment actionSpecify this flag:To direct c89 to:
Run the Accelerator program-OAccelerate a program file
Run the C compiler without specifying
the RUNNABLE pragma
-cCompile the specified source files, but
do not bind them
Default behavior-WverboseDisplay detailed information from the
C compiler, Binder, and Accelerator
Working in the OSS Environment 269