2.9BSD/usr/man/cat1/cc.1

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


CC(1)               UNIX Programmer's Manual                CC(1)

NAME
     cc, pcc - C compiler

SYNOPSIS
     cc [ option ] ... file ...

     pcc [ option ] ... file ...

DESCRIPTION
     _C_c is the UNIX C compiler.  It accepts several types of
     arguments:

     Arguments whose names end with `.c' 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 `.o' sub-
     stituted for `.c'.  The `.o' file is normally deleted, how-
     ever, if a single C program is compiled and loaded all at
     one go.

     In the same way, arguments whose names end with `.s' are
     taken to be assembly source programs and are assembled, pro-
     ducing a `.o' file.

     The following options are interpreted by _c_c.  See _l_d(1) for
     load-time options.

     -c      Suppress the loading phase of the compilation, and
             force an object file to be produced even if only one
             program is compiled.

     -p      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
             _m_o_n_i_t_o_r(3) at the start and arranges to write out a
             _m_o_n._o_u_t file at normal termination of execution of
             the object program.  An execution profile can then
             be generated by use of _p_r_o_f(1).

     -f      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.

     -O      Invoke an object-code optimizer.

     -S      Compile the named C programs, and leave the
             assembler-language output on corresponding files
             suffixed `.s'.

     -P      Run only the macro preprocessor and place the result

Printed 7/22/83                                                 1

CC(1)               UNIX Programmer's Manual                CC(1)

             for each `.c' file in a corresponding `.i' file and
             has no `#' lines in it.

     -E      Run only the macro preprocessor and send the result
             to the standard output.  The output is intended for
             compiler debugging; it is unacceptable as input to
             _c_c.

     -V      Compile for use in overlaid programs.  This option
             is normally used with -c; the loading should be done
             directly with _l_d(1).  The special name _C__O_V_E_R_L_A_Y is
             automatically defined (see the -D option below).
             This is useful in header files that may be used both
             with and without overlays.

     -o _o_u_t_p_u_t
             Name the final output file _o_u_t_p_u_t.  If this option
             is used the file `a.out' will be left undisturbed.

     -D_n_a_m_e=_d_e_f
     -D_n_a_m_e  Define the _n_a_m_e to the preprocessor, as if by
             `#define'.  If no definition is given, the name is
             defined as 1.

     -U_n_a_m_e  Remove any initial definition of _n_a_m_e.

     -I_d_i_r   `#include' files whose names do not begin with `/'
             are always sought first in the directory of the _f_i_l_e
             argument, then in directories named in -I options,
             then in directories on a standard list.

     -B_s_t_r_i_n_g
             Find substitute compiler passes in the files named
             _s_t_r_i_n_g with the suffixes cpp, c0, c1 and c2.  If
             _s_t_r_i_n_g is empty, use a standard backup version.

     -t[p012]
             Find only the designated compiler passes in the
             files whose names are constructed by a -B option.
             In the absence of a -B option, the _s_t_r_i_n_g is taken
             to be `/usr/c/'.

     Other arguments are taken to be either loader option argu-
     ments, or C-compatible object programs, typically produced
     by an earlier _c_c 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 a.out.

     The major purpose of the `portable C compiler', _p_c_c, is to
     serve as a model on which to base other compilers.  _P_c_c does
     not support options -f, -V, -E, -B, and -t.  It provides, in

Printed 7/22/83                                                 2

CC(1)               UNIX Programmer's Manual                CC(1)

     addition to the language of _c_c, unsigned char type data and
     initialized bit fields.

FILES
     file.c              input file
     file.o              object file
     a.out               loaded output
     /tmp/ctm?           temporaries for _c_c
     /lib/cpp            preprocessor
     /lib/c[01]          compiler for _c_c
     /lib/fc[01]         floating-point compiler
     /lib/c2             optional optimizer
     /lib/crt0.o         runtime startoff
     /lib/mcrt0.o        startoff for profiling
     /lib/fcrt0.o        startoff for floating-point interpreta-
     tion
     /lib/libc.a         standard library, see _i_n_t_r_o(3)
     /usr/lib/libovc.a   standard library for use with overlays
     /usr/include        standard directory for `#include' files
     /tmp/pc*            temporaries for _p_c_c
     /usr/lib/ccom       compiler for _p_c_c

SEE ALSO
     B. W. Kernighan and D. M. Ritchie, _T_h_e _C _P_r_o_g_r_a_m_m_i_n_g
     _L_a_n_g_u_a_g_e, Prentice-Hall, 1978
     D. M. Ritchie, _C _R_e_f_e_r_e_n_c_e _M_a_n_u_a_l
     adb(1), ld(1), prof(1), monitor(3)

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, _a_s(1), in particular `m', which means a
     multiply-defined external symbol (function or data).

BUGS
     _P_c_c is little tried on the PDP11; specialized code generated
     for that machine has not been well shaken down.  The -O
     optimizer was designed to work with _c_c; its use with _p_c_c is
     suspect.  The optimizer is also known to (rarely) produce
     incorrect code with _c_c as well.

Printed 7/22/83                                                 3