1CC(1)                       General Commands Manual                      CC(1)
2
3
4

NAME

6       cc, pcc - C compiler
7

SYNOPSIS

9       cc [ option ] ... file ...
10
11       pcc [ option ] ... file ...
12

DESCRIPTION

14       Cc is the UNIX C compiler.  It accepts several types of arguments:
15
16       Arguments  whose names end with `.c' are taken to be C source programs;
17       they are compiled, and each object program is left on  the  file  whose
18       name  is  that  of the source with `.o' substituted for `.c'.  The `.o'
19       file is normally deleted, however, if a single C  program  is  compiled
20       and loaded all at one go.
21
22       In  the  same  way, arguments whose names end with `.s' are taken to be
23       assembly source programs and are assembled, producing a `.o' file.
24
25       The following options are interpreted by cc.  See ld(1)  for  load-time
26       options.
27
28       -c      Suppress  the  loading  phase  of the compilation, and force an
29               object file to be produced even if only  one  program  is  com‐
30               piled.
31
32       -p      Arrange  for the compiler to produce code which counts the num‐
33               ber of times each routine is called;  also,  if  loading  takes
34               place,  replace the standard startup routine by one which auto‐
35               matically calls monitor(3) at the start and arranges  to  write
36               out  a  mon.out  file at normal termination of execution of the
37               object program.  An execution profile can then be generated  by
38               use of prof(1).
39
40       -f      In  systems  without  hardware floating-point, use a version of
41               the C compiler which handles floating-point constants and loads
42               the object program with the floating-point interpreter.  Do not
43               use if the hardware is present.
44
45       -O      Invoke an object-code optimizer.
46
47       -S      Compile the named C programs, and leave the  assembler-language
48               output on corresponding files suffixed `.s'.
49
50       -P      Run  only  the macro preprocessor and place the result for each
51               `.c' file in a corresponding `.i' file and has no `#' lines  in
52               it.
53
54       -E      Run  only  the  macro  preprocessor  and send the result to the
55               standard output.  The output is intended  for  compiler  debug‐
56               ging; it is unacceptable as input to cc.
57
58       -o output
59               Name  the final output file output.  If this option is used the
60               file `a.out' will be left undisturbed.
61
62       -Dname=def
63       -Dname  Define the name to the preprocessor, as if by `#define'.  If no
64               definition is given, the name is defined as 1.
65
66       -Uname  Remove any initial definition of name.
67
68       -Idir   `#include'  files  whose names do not begin with `/' are always
69               sought first in the directory of the  file  argument,  then  in
70               directories named in -I options, then in directories on a stan‐
71               dard list.
72
73       -Bstring
74               Find substitute compiler passes in the files named string  with
75               the  suffixes  cpp,  c0,  c1 and c2.  If string is empty, use a
76               standard backup version.
77
78       -t[p012]
79               Find only the designated compiler passes  in  the  files  whose
80               names  are  constructed by a -B option.  In the absence of a -B
81               option, the string is taken to be `/usr/c/'.
82
83       Other arguments are taken to be either loader option arguments,  or  C-
84       compatible object programs, typically produced by an earlier cc run, or
85       perhaps libraries of C-compatible routines.  These  programs,  together
86       with  the  results  of  any  compilations specified, are loaded (in the
87       order given) to produce an executable program with name a.out.
88
89       The major purpose of the `portable C compiler', pcc, is to serve  as  a
90       model  on  which to base other compilers.  Pcc does not support options
91       -f, -E, -B, and -t.  It provides, in addition to the  language  of  cc,
92       unsigned char type data and initialized bit fields.
93

FILES

95       file.c          input file
96       file.o          object file
97       a.out           loaded output
98       /tmp/ctm?       temporaries for cc
99       /lib/cpp        preprocessor
100       /lib/c[01]      compiler for cc
101       /usr/c/oc[012]  backup compiler for cc
102       /usr/c/ocpp     backup preprocessor
103       /lib/fc[01]     floating-point compiler
104       /lib/c2         optional optimizer
105       /lib/crt0.o     runtime startoff
106       /lib/mcrt0.o    startoff for profiling
107       /lib/fcrt0.o    startoff for floating-point interpretation
108       /lib/libc.a     standard library, see intro(3)
109       /usr/include    standard directory for `#include' files
110       /tmp/pc*        temporaries for pcc
111       /usr/lib/ccom   compiler for pcc
112

SEE ALSO

114       B.  W.  Kernighan  and D. M. Ritchie, The C Programming Language, Pren‐
115       tice-Hall, 1978
116       D. M. Ritchie, C Reference Manual
117       monitor(3), prof(1), adb(1), ld(1)
118

DIAGNOSTICS

120       The diagnostics produced by C itself are intended to  be  self-explana‐
121       tory.   Occasional messages may be produced by the assembler or loader.
122       Of these, the most mystifying are from the assembler, as(1), in partic‐
123       ular  `m',  which means a multiply-defined external symbol (function or
124       data).
125

BUGS

127       Pcc is little tried on the PDP11; specialized code generated  for  that
128       machine  has  not been well shaken down.  The -O optimizer was designed
129       to work with cc; its use with pcc is suspect.
130
131
132
133                                     PDP11                               CC(1)
Impressum