PWB1/usr/man/man1/cc.1

Compare this file to the similar file:
Show the results in this format:

.th CC I 5/31/77
.sh NAME
cc \*- C compiler
.sh SYNOPSIS
.bd cc
[\c
.bd \*-c\c
] [\c
.bd \*-p\c
] [\c
.bd \-f\c
] [\c
.bd \*-D\c
n\c
.bd =\c
v] [\c
.bd \*-I\c
dir] [\c
.bd \*-O\c
] [\c
.bd \*-S\c
] [\c
.bd \*-P\c
] [\c
.bd \*-U\c
n] files ...
.sh DESCRIPTION
.it Cc
is the UNIX C compiler.
It accepts three types of arguments:
.s3
Arguments whose names end with `\fB.\fPc' are taken to be
C source programs; they are compiled, and
each object program is left on the file
whose name is that of the source with `\fB.\fPo' substituted
for `\fB.\fPc'.
The `\fB.\fPo' file is normally deleted, however, if a single
C program is compiled and loaded all at one go.
.s3
The following flags are interpreted by
.it cc.
See
.it ld\^\c
(I)
for load-time flags.
.s3
.lp +6 5
\fB\*-c\fR	Suppress the loading phase of the compilation, and force
an object file to be produced even if only one program is compiled.
.s3
.lp +6 5
\fB\*-p\fR	Arrange for the compiler to produce code
which counts the number of times each routine is called;
also, if loading takes place, replace the standard startup
routine by one which automatically calls the
.it monitor\^\c
(III) subroutine
at the start and arranges to write out a
.it mon.out
file at normal termination of execution of the object program.
An execution profile can then be generated by
use of
.it prof\^\c
(I).
.s3
.lp +6 5
\fB\-f\fR	In systems without hardware floating-point,
use a version of the C compiler which handles floating-point
constants and
loads the object program with the floating-point interpreter.
Do not use if the hardware is present.
.s3
.lp +6 5
\fB\*-D\fR	The
name
.it n
is 
.it defined,
and is given the value
.it v,
if specified.
.s3
.lp +6 5
\fB\*-O\fR	Invoke an
object-code optimizer.
.s3
.lp +6 5
\fB\*-S\fR	Compile the named C programs, and leave the
assembler-language output on corresponding files suffixed `\fB.\fPs'.
.s3
.lp +6 5
\fB\*-P\fR	Run only the macro preprocessor
on the named C programs, and leave the output on corresponding
files suffixed `\fB.\fPi'.
.s3
.lp +6 5
\fB\*-U\fR	The name
.it n
is 
.it undefined.
.s3
.lp +6 5
\fB\*-I\fP	The
.it include
preprocessor statement looks in directory
.it dir
if it can't find the specified file in
the local directory or in
.bd /usr/include.
.i0
.dt
.s3
Other arguments
are taken
to be either loader flag arguments, or C-compatible
object programs, typically produced by an earlier
.it cc
run,
or perhaps libraries of C-compatible routines.
These programs, together with the results of any
compilations specified, are loaded (in the order
given) to produce an executable program with name
.bd a.out.
If desired, a different name can be used; see the
.bd \-o
option of 
.it ld\^\c
(I).
.sh FILES
.lp 20 15
file.c	input file
.lp 20 15
file.o	object file
.lp 20 15
a.out	loaded output
.lp 20 15
/tmp/ctm?	temporary
.lp 20 15
/lib/c[01]	compiler
.lp 20 15
/lib/fc[01]	floating-point compiler
.lp 20 15
/lib/c2	optional optimizer
.lp 20 15
/lib/cpp	pre-processor
.lp 20 15
/lib/crt0.o	runtime startoff
.lp 20 15
/lib/mcrt0.o	runtime startoff of profiling
.lp 20 15
/lib/fcrt0.o	runtime startoff for floating-point interpretation
.lp 20 15
/lib/libc.a	C library; see section III.
.lp 20 15
/lib/liba.a	Assembler library used by some routines in libc.a
.i0
.sh "SEE ALSO"
.it "C Reference Manual"
by D. M. Ritchie.
.br
.it "Programming in C \\- A Tutorial"
by B. W. Kernighan.
.br
adb(I), cdb(I), ld(I), prof(I), monitor(III)
.sh DIAGNOSTICS
The diagnostics produced by C itself are intended to be
self-explanatory.
Occasional messages may be produced by the assembler
or loader (see
.it as\^\c
(I) and
.it ld\^\c
(I)).
Of these, the most mystifying are from the assembler,
in particular ``m,'' which means
a multiply-defined external symbol (function
or data).