Interdata_v6/usr/doc/man/man1/cc.1
.th CC I
.sh NAME
cc \*- C compiler
.sh SYNOPSIS
cc [-c] [-p] [-o out] [-Ddef] [-Udef] [-Ifile] [-S] [-P] [-m] file ...
.sh DESCRIPTION
.it cc
is the UNIX C compiler.
It accepts three types of arguments:
.s3
Arguments whose names end with `.c' or `.s' are taken to be
C or assembly-language source programs; they are compiled, and
each object program is left on the file
whose name is that of the source with `.o' substituted
for `.c'.
The `.o' 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 (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
subroutine (III)
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
(I).
.s3
.lp +6 5
\fB\*-m\fR Allow multiple definitions of \fIextern\fR variables
in different files; for compatibility with earlier
versions of the PDP-11 C compiler.
.s3
.lp +6 5
\fB\*-o\fR The executable output is placed in
.it out
instead of
.it a.out.
.s3
.lp +6 5
\fB\*-D\fR Makes
.it def
defined to the preprocessor.
.s3
.lp +6 5
\fB\*-U\fR Makes
.it def
undefined to the preprocessor.
.s3
.lp +6 5
\fB\*-I\fR Search the directory
.it dir
for #include files.
.s3
.lp +6 5
\fB\*-S\fR Compile the named C programs, and leave the
assembler-language output on corresponding files suffixed `.s'.
.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 `.i'.
.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.
.sh FILES
file.c input file
.br
file.s assembler source file
.br
file.o object file
.br
a.out loaded output
.br
/tmp/ctm? temporary
.br
/lib/cpp preprocessor
.br
/lib/c[01] compiler
.br
/lib/crt0.o runtime startoff
.br
/lib/mcrt0.o runtime startoff for profiling
.br
/lib/libc.a C library; see section III.
.br
/lib/liba.a Assembler library used by some routines in libc.a;
see Section II.
.sh "SEE ALSO"
``Programming in C\(em a tutorial,''
C Reference Manual,
monitor (III), prof (I), ddt (I), ld (I).
.sh DIAGNOSTICS
The diagnostics produced by C itself are intended to be
self-explanatory.
Occasional messages may be produced by the assembler
or loader.
Of these, the most mystifying are from the assembler,
in particular `M,' which means
a multiply-defined external symbol (function
or data).
.sh BUGS
Double precision is unimplemented
.it (double
is synonymous with
.it float).
Alignment of data objects is poorly implemented; in particular
aggregates
.it "(struct, union)"
are always aligned on fullword boundaries and rounded to fullword length.
There is no
.it "unsigned short"
type.
Structures containing unions or bit fields
cannot be initialized correctly.