4.3BSD-Tahoe/usr/man/cat1/cc.0

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




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



NNAAMMEE
     cc - C compiler

SSYYNNOOPPSSIISS
     cccc [ option ] ... file ...

DDEESSCCRRIIPPTTIIOONN
     _C_c is the UNIX C compiler.  _C_c 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.

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

     --gg      Have the compiler produce additional symbol table
	     information for _d_b_x(1).  Also pass the --llgg flag to
	     _l_d(1).

     --ggoo     Have the compiler produce additional symbol table
	     information for the obsolete debugger _s_d_b(1).  Also
	     pass the --llgg flag to _l_d(1).

     --ww      Suppress warning diagnostics.

     --pp      Arrange for the compiler to produce code which
	     counts the number of times each routine is called.
	     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).

     --ppgg     Causes the compiler to produce counting code in the
	     manner of --pp,, but invokes a run-time recording
	     mechanism that keeps more extensive statistics and
	     produces a _g_m_o_n._o_u_t file at normal termination.
	     Also, a profiling library is searched, in lieu of



Printed 7/9/88		  June 7, 1985				1






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



	     the standard C library.  An execution profile can
	     then be generated by  use of _g_p_r_o_f(1).

     --OO      Invoke an object-code improver.

     --RR      Passed on to _a_s, making initialized variables shared
	     and read-only.

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

     --MM      Run only the macro preprocessor on the named C pro-
	     grams, requesting it to generate Makefile dependen-
	     cies and send the result to the standard output.

     --EE      Run only the macro preprocessor on the named C pro-
	     grams, and send the result to the standard output.

     --CC      prevent the macro preprocessor from eliding com-
	     ments.

     --oo _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.

     --DD_n_a_m_e=_d_e_f
     --DD_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".

     --UU_n_a_m_e  Remove any initial definition of _n_a_m_e.

     --II_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 --II options,
	     then in directories on a standard list.

     --LL_d_i_r   Library archives are sought first in directories
	     named in --LL options, then in directories on a stan-
	     dard list.

     --ff      Use an alternate compiler which does not convert
	     expressions involving only floats to double. This
	     does not conform to the standard which states that
	     all intermediate results should be converted to dou-
	     ble but does provide a speed improvement for pro-
	     grams which don't require full double precision.
	     This option also makes rreeggiisstteerr ffllooaatt variables work
	     appropriately.

     --BB_s_t_r_i_n_g



Printed 7/9/88		  June 7, 1985				2






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



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

     --tt[pp001122]
	     Find only the designated compiler passes in the
	     files whose names are constructed by a --BB option.
	     In the absence of a --BB 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 aa..oouutt..

FFIILLEESS
     file.c	   input file
     file.o	   object file
     a.out	   loaded output
     /tmp/ctm?	   temporary
     /lib/cpp	   preprocessor
     /lib/ccom	   compiler
     /lib/sccom    compiler for single precision floats
     /usr/c/occom  backup compiler
     /usr/c/ocpp   backup preprocessor
     /lib/c2	   optional optimizer
     /lib/crt0.o   runtime startoff
     /lib/mcrt0.o  startoff for profiling
     /usr/lib/gcrt0.ostartoff for gprof-profiling
     /lib/libc.a   standard library, see _i_n_t_r_o(3)
     /usr/lib/libc_p.aprofiling library, see _i_n_t_r_o(3)
     /usr/include  standard directory for `#include' files
     mon.out	   file produced for analysis by _p_r_o_f(1)
     gmon.out	   file produced for analysis by _g_p_r_o_f(1)

SSEEEE AALLSSOO
     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
     B. W. Kernighan, _P_r_o_g_r_a_m_m_i_n_g _i_n _C-_a _t_u_t_o_r_i_a_l
     D. M. Ritchie, _C _R_e_f_e_r_e_n_c_e _M_a_n_u_a_l
     monitor(3), prof(1), gprof(1), adb(1), ld(1), dbx(1), as(1)

DDIIAAGGNNOOSSTTIICCSS
     The diagnostics produced by C itself are intended to be
     self-explanatory.	Occasional messages may be produced by
     the assembler or loader.

BBUUGGSS
     The compiler currently ignores advice to put cchhaarr, uunnssiiggnneedd
     cchhaarr, sshhoorrtt, uunnssiiggnneedd sshhoorrtt, ffllooaatt, or ddoouubbllee variables in



Printed 7/9/88		  June 7, 1985				3






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



     registers, except as noted above.	It previously produced
     poor, and in some cases incorrect, code for such declara-
     tions.




















































Printed 7/9/88		  June 7, 1985				4