Open System Services Shell and Utilities Reference Manual (G06.29+, H06.08+, J06.03+)

User Commands (c) c99(1)
If -Wwarn=w is specified, then -Wnowarn must also be specified or the -Wwarn=w
flag is ignored. If -Wnowarn=w is specified, then -Wwarn need not be specified.
If white space is present after the commas, the list of warning message numbers should
be enclosed in quotation marks.
-Wwarn is the default specification for this flag. -Ww overrides the -W[no]warn flag.
-Wx Strips part of the symbol table from the output object file but keeps information neces-
sary for the object file to be used as input to a linker utility again. This flag is typically
used with -Wr.
Multiple instances of the -D, -I, and -U flags and of the -l operands can be specified.
The position of -l library operands within a list of flags affects the order in which the libraries are
searched.
The order of specifying the -I and -L flags is significant.
Quotation marks around string values in flags are optional but recommended to avoid errors
caused by shell substitutions or deletions.
Refer to the C/C++ Programmer’s Guide for details.
DESCRIPTION
c99 is a driver program for the native C and C++ language compilation system. The c99 utility
compiles C and C++ programs using the native TNS/E compilers. Source files must comply with
the C99 (ISO/IEC 9899:1999) standard, but are permitted to use HP extensions if you specify the
-Wextensions flag. For source files that comply with the C89 standard or for programs that
require the compiler to process C source files traditional Kernighan and Ritchie C or Common C
rules, instead of according to ISO/ANSI Standard C, use the c89 utility with the -Wkr flag.
This reference page describes using c99 in the OSS environment.
c99 performs simple validation of the flags and operands from the arguments on its command
line and, depending on those arguments, invokes components of the language compilation sys-
tem. c99 does not verify the existence of files it passes to compilation system components. It
does verify that the operand suffix identifies a valid operand to pass to compilation system com-
ponents. c99 and the components it runs issue messages to the standard error file.
c99 performs the following steps:
1. If the corresponding -W flag is specified, invokes the SQL/MX preprocessor to process
any embedded SQL statements in C or C++ source files, creating C only, C++ only, or
module definition files as appropriate.
2. Compiles any specified C and C++ source files or source files produced by Step 1 into
object files.
3. If the -Wmxcmp flag is specified, invokes the NonStop SQL/MX compiler to process
files created by Step 1 or specified as module definition files in the command.
4. Links the object files together with any libraries specified on the command line. (This
occurs if no flags that prevent linking are specified and the source files are compiled
without errors.)
5. Writes an executable object file or library to the file specified by a -o flag (if present) or
to the file a.out.
527188-021 Hewlett-Packard Company 253