Annotation of 43BSDTahoe/man/man1/cc.1, revision 1.1.1.1

1.1       root        1: .\" Copyright (c) 1980 Regents of the University of California.
                      2: .\" All rights reserved.  The Berkeley software License Agreement
                      3: .\" specifies the terms and conditions for redistribution.
                      4: .\"
                      5: .\"    @(#)cc.1        6.2 (Berkeley) 6/7/85
                      6: .\"
                      7: .TH CC 1 "June 7, 1985"
                      8: .UC 4
                      9: .SH NAME
                     10: cc \- C compiler
                     11: .SH SYNOPSIS
                     12: .B cc
                     13: [ option ] ... file ...
                     14: .SH DESCRIPTION
                     15: .I Cc
                     16: is the UNIX C compiler.
                     17: .I Cc
                     18: accepts several types of arguments:
                     19: .PP
                     20: Arguments whose names end with `.c' are taken to be
                     21: C source programs; they are compiled, and
                     22: each object program is left on the file
                     23: whose name is that of the source with `.o' substituted
                     24: for `.c'.
                     25: The `.o' file is normally deleted, however, if a single
                     26: C program is compiled and loaded all at one go.
                     27: .PP
                     28: In the same way,
                     29: arguments whose names end with `.s' are taken to be assembly source programs
                     30: and are assembled, producing a `.o' file.
                     31: .PP
                     32: The following options are interpreted by
                     33: .IR cc .
                     34: See
                     35: .IR ld (1)
                     36: for load-time options.
                     37: .TP 8
                     38: .B \-c
                     39: Suppress the loading phase of the compilation, and force
                     40: an object file to be produced even if only one program is compiled.
                     41: .TP
                     42: .B \-g
                     43: Have the compiler produce additional symbol table information
                     44: for 
                     45: .IR dbx (1).
                     46: Also pass the
                     47: .B \-lg
                     48: flag to
                     49: .IR ld (1).
                     50: .TP
                     51: .B \-go
                     52: Have the compiler produce additional symbol table information
                     53: for the obsolete debugger
                     54: .IR sdb (1).
                     55: Also pass the
                     56: .B \-lg
                     57: flag to
                     58: .IR ld (1).
                     59: .TP
                     60: .B \-w
                     61: Suppress warning diagnostics.
                     62: .TP
                     63: .B \-p
                     64: Arrange for the compiler to produce code
                     65: which counts the number of times each routine is called.
                     66: If loading takes place, replace the standard startup
                     67: routine by one which automatically calls
                     68: .IR monitor (3)
                     69: at the start and arranges to write out a
                     70: .I mon.out
                     71: file at normal termination of execution of the object program.
                     72: An execution profile can then be generated by
                     73: use of
                     74: .IR  prof (1).
                     75: .TP
                     76: .B \-pg
                     77: Causes the compiler to produce counting code in the manner of
                     78: .B \-p,
                     79: but invokes a run-time recording mechanism that keeps more
                     80: extensive statistics and produces a 
                     81: .I gmon.out
                     82: file at normal termination.
                     83: Also, a profiling library is searched, in lieu of the standard C library.
                     84: An execution profile can then be generated by  use of
                     85: .IR gprof (1).
                     86: .TP
                     87: .SM
                     88: .B \-O
                     89: Invoke an
                     90: object-code improver.
                     91: .TP
                     92: .SM
                     93: .B \-R
                     94: Passed on to
                     95: .I as,
                     96: making initialized variables shared and read-only.
                     97: .TP
                     98: .SM
                     99: .B \-S
                    100: Compile the named C programs, and leave the
                    101: assembler-language output on corresponding files suffixed `.s'.
                    102: .TP
                    103: .SM
                    104: .B \-M
                    105: Run only the macro preprocessor
                    106: on the named C programs,
                    107: requesting it to generate Makefile dependencies
                    108: and send the result to the standard output.
                    109: .TP
                    110: .SM
                    111: .B \-E
                    112: Run only the macro preprocessor
                    113: on the named C programs, and send the result to the
                    114: standard output.
                    115: .TP
                    116: .SM
                    117: .B \-C
                    118: prevent the macro preprocessor from eliding comments.
                    119: .TP
                    120: .BI \-o " output"
                    121: Name the final output file
                    122: .IR output .
                    123: If this option is used the file `a.out' will be left undisturbed.
                    124: .TP
                    125: .SM
                    126: .BI \-D name=def
                    127: .br
                    128: .ns
                    129: .TP
                    130: .SM
                    131: .BI \-D \*Sname
                    132: Define the
                    133: .I name
                    134: to the preprocessor,
                    135: as if by
                    136: `#define'.
                    137: If no definition is given, the name is defined as "1".
                    138: .TP
                    139: .SM
                    140: .BI \-U \*Sname
                    141: Remove any initial definition of
                    142: .IR name .
                    143: .TP
                    144: .SM
                    145: .BI \-I \*Sdir
                    146: `#include' files
                    147: whose names do not begin with `/' are always
                    148: sought first in the directory 
                    149: of the
                    150: .I file
                    151: argument,
                    152: then in directories named in 
                    153: .B \-I
                    154: options,
                    155: then in directories on a standard list.
                    156: .TP
                    157: .SM
                    158: .BI \-L \*Sdir
                    159: Library archives are sought first in
                    160: directories named in
                    161: .B \-L
                    162: options,
                    163: then in directories on a standard list.
                    164: .TP
                    165: .B \-f
                    166: Use an alternate compiler which does not convert expressions involving
                    167: only floats to double. This does not conform to the standard which states
                    168: that all intermediate results should be converted to double but does
                    169: provide a speed improvement for programs which don't require full double
                    170: precision.  This option also makes
                    171: .B "register float"
                    172: variables work appropriately.
                    173: .TP
                    174: .SM
                    175: .BI \-B \*Sstring
                    176: Find substitute compiler passes in the files named
                    177: .I string
                    178: with the suffixes cpp, ccom and c2.
                    179: If 
                    180: .I string 
                    181: is empty, use a standard backup version.
                    182: .TP
                    183: .BR \-t [ p012 ]
                    184: Find only the designated compiler passes in the
                    185: files whose names are constructed by a
                    186: .B \-B
                    187: option.
                    188: In the absence of a
                    189: .B \-B 
                    190: option, the
                    191: .I string
                    192: is taken to be `/usr/c/'.
                    193: .PP
                    194: Other arguments
                    195: are taken
                    196: to be either loader option arguments, or C-compatible
                    197: object programs, typically produced by an earlier
                    198: .I cc
                    199: run,
                    200: or perhaps libraries of C-compatible routines.
                    201: These programs, together with the results of any
                    202: compilations specified, are loaded (in the order
                    203: given) to produce an executable program with name
                    204: .B a.out.
                    205: .SH FILES
                    206: .ta \w'/usr/c/occom  'u
                    207: file.c input file
                    208: .br
                    209: file.o object file
                    210: .br
                    211: a.out  loaded output
                    212: .br
                    213: /tmp/ctm?      temporary
                    214: .br
                    215: /lib/cpp       preprocessor
                    216: .br
                    217: /lib/ccom      compiler
                    218: .br
                    219: /lib/sccom     compiler for single precision floats
                    220: .br
                    221: /usr/c/occom   backup compiler
                    222: .br
                    223: /usr/c/ocpp    backup preprocessor
                    224: .br
                    225: /lib/c2        optional optimizer
                    226: .br
                    227: /lib/crt0.o    runtime startoff
                    228: .br
                    229: /lib/mcrt0.o   startoff for profiling
                    230: .br
                    231: /usr/lib/gcrt0.o       startoff for gprof-profiling
                    232: .br
                    233: /lib/libc.a    standard library, see
                    234: .IR intro (3)
                    235: .br
                    236: /usr/lib/libc_p.a      profiling library, see
                    237: .IR intro (3)
                    238: .br
                    239: /usr/include   standard directory for `#include' files
                    240: .br
                    241: mon.out        file produced for analysis by
                    242: .IR prof (1)
                    243: .br
                    244: gmon.out       file produced for analysis by
                    245: .IR gprof (1)
                    246: .SH "SEE ALSO"
                    247: B. W. Kernighan and D. M. Ritchie,
                    248: .I The C Programming Language,
                    249: Prentice-Hall,
                    250: 1978
                    251: .br
                    252: B. W. Kernighan,
                    253: .I
                    254: Programming in C\(ema tutorial
                    255: .br
                    256: D. M. Ritchie,
                    257: .I
                    258: C Reference Manual
                    259: .br
                    260: monitor(3), prof(1), gprof(1), adb(1), ld(1), dbx(1), as(1)
                    261: .SH DIAGNOSTICS
                    262: The diagnostics produced by C itself are intended to be
                    263: self-explanatory.
                    264: Occasional messages may be produced by the assembler
                    265: or loader.
                    266: .SH BUGS
                    267: The compiler currently ignores advice to put 
                    268: \fBchar\fR, \fBunsigned char\fR,
                    269: \fBshort\fR, \fBunsigned short\fR,
                    270: \fBfloat\fR, or \fBdouble\fR
                    271: variables in registers, except as noted above.  It previously
                    272: produced poor, and in some cases incorrect, code for such declarations.

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.