CC(1)                                                       CC(1)

          cc, CC - C compilers

          cc [ option ] ... file ...

          CC [ option ] ... file ...

          Cc compiles the language C; and CC compiles C++.  File argu-
          ments ending 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' substituted for `.c'.
               The `.o' file is normally deleted, however, if a single
               C program is compiled and loaded all at one go.

          .s   are taken to be assembly source programs and are assem-
               bled, producing a `.o' file.

          The following options are interpreted by cc and CC. See
          ld(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.

          -g   Have the compiler produce additional symbol table
               information for sdb(1) or pi(9.1). Also pass the -lg
               flag to ld(1).

          -w   Suppress warning diagnostics.

          -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 rou-
               tine by one which arranges to gather profiling data for
               later examination by prof(1).

          -O   Invoke an object-code improver.

          -R   Passed on to as, making initialized variables shared
               and read-only.

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

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

     CC(1)                                                       CC(1)

               Run only the macro preprocessor and the C++ front end
               cfront on the named C programs, and send the result to
               the standard ouput.  If c is present, produce output
               suitable for input to cc.

          -C   Prevent the macro preprocessor from eliding comments.

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

               Define the name to the preprocessor, as if by
               `#define'.  If no definition is given, the name is
               defined as "1".

               Remove any initial definition of name.

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

          These options are peculiar to cc:

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

               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 string is taken to be

          These options are peculiar to CC:

               Instead of the standard output, place -E and -F output
               in files whose name is that of the source with .suffix
               substituted for `.c'.

          +E   Use C rules for scope of non-local names.

          +S   Print debugging information from cfront on the standard
               error file.

     CC(1)                                                       CC(1)

          +d   Don't expand inline functions.

               Take size and alignment information from file name for
               cross compiling.

               environment parameters and their defaults; see FILES

          Other arguments are taken to be either loader options or C-
          compatible object programs, typically produced by an earlier
          cc run, or perhaps libraries of C-compatible routines.
          These programs, together with the results of any compila-
          tions specified, are loaded (in the order given) to produce
          an executable program with name a.out.

          file.c             input file
          file.i             cfront output
          file.o             object file
          a.out              loaded output
          /tmp/ctm?          temporary
          /lib/cpp           preprocessor
          /lib/ccom          C compiler
          /usr/bin/cfront    CC front end, filter from C++ to C
          /lib/c2            optional optimizer
          /lib/crt0.o        runtime startoff
          /lib/mcrt0.o       startoff for profiling
          /lib/libc.a        standard library, see (3)
          /lib/libC.a        C++ library
          /usr/include       standard directory for C `#include' files
          /usr/include/CC    standard directory for C++ `#include files'

          B. W. Kernighan and D. M. Ritchie, The C Programming
          Language, Prentice-Hall, 1978
          D. M. Ritchie, C Reference Manual
          B. Stroustrup, A C++ Tutorial, AT&T Bell Labs CSTR-113, 1984
          B. Stroustrup, C++ Reference Manual, AT&T Bell Labs CSTR-
          108, 1984
          lint(1), cyntax(1), ld(1), prof(1), adb(1), sdb(1), pi(9.1)

          The diagnostics produced by the compilers are intended to be
          self-explanatory.  Occasional messages may be produced by
          the assembler as(1) or loader ld(1).

          CC can not yet handle certain constructs, for which it

     CC(1)                                                       CC(1)

          reports, "sorry, not implemented."
          To permit the use of standard, untyped C libraries, CC makes
          the loader name of the first function having a given name
          agree with the loader name from cc. Thus

               overload read(int,char*,int), read(vector*);

          arranges for read(2) to be called, as well as another `read'
          for a newly defined type.  Reversing the declarations would
          cause chaos, even in programs that do not directly call
          read(2), but do use stdio(3) input.