|
|
1.1 ! root 1: .TH CC 1 ! 2: .CT 1 prog_c ! 3: .SH NAME ! 4: cc, lcc \- C compilers ! 5: .SH SYNOPSIS ! 6: .B cc ! 7: [ ! 8: .I option ... ! 9: ] ! 10: .I file ... ! 11: .PP ! 12: .B lcc ! 13: [ ! 14: .I option ... ! 15: ] ! 16: .I file ... ! 17: .SH DESCRIPTION ! 18: .I Cc ! 19: compiles the classic C language; ! 20: .I lcc ! 21: compiles ! 22: .SM ANSI. ! 23: They are otherwise similar. ! 24: In the absence of options, any named source ! 25: .I files ! 26: are compiled into object files and then linked, ! 27: together with any named object ! 28: .I files, ! 29: into a single executable file named ! 30: .FR a.out . ! 31: Compilation normally has four phases: preprocessing of ! 32: .B # ! 33: directives, compilation to assembly language, assembly, ! 34: and linking. ! 35: Suffixes of ! 36: .I file ! 37: names determine which phases they participate in: ! 38: .TP ! 39: .B .c ! 40: C source to be preprocessed and compiled. ! 41: Object code for this file is finally placed in a ! 42: correspondingly named ! 43: .L .o ! 44: file, except when exactly one file is being compiled and linked. ! 45: .TP ! 46: .B .i ! 47: C source to be compiled without preprocessing; ! 48: .B # ! 49: directives are ignored by ! 50: .I cc, ! 51: forbidden by ! 52: .I lcc. ! 53: .TP ! 54: .B .s ! 55: Assembler source to be assembled, producing a ! 56: .L .o ! 57: file. ! 58: .TP ! 59: .B .o ! 60: A preexisting object file to be linked. ! 61: .PP ! 62: Both compilers accept options of ! 63: .IR ld (1), ! 64: the most common of which are ! 65: .B -o ! 66: (to substitute a name for ! 67: .BR a.out ) ! 68: and ! 69: .BR -l ! 70: (to link from a library), and in addition ! 71: .TP ! 72: .B -c ! 73: Suppress the linking phase, producing ! 74: .B .o ! 75: files but no ! 76: .BR a.out . ! 77: .TP ! 78: .B -g ! 79: Produce additional symbol table information ! 80: for debuggers such as ! 81: .IR pi (9.1). ! 82: .TP ! 83: .B -O ! 84: Invoke an ! 85: object-code improver; superfluous in ! 86: .I lcc. ! 87: .TP ! 88: .B -w ! 89: Suppress warning diagnostics. ! 90: In ! 91: .I lcc, ! 92: .B #pragma ref ! 93: .I variable ! 94: supplies a dummy reference to suppress ! 95: an unused-variable diagnostic. ! 96: .TP ! 97: .B -p ! 98: Arrange for the compiler to produce code ! 99: which counts the number of times each routine is called; ! 100: also, if linking takes place, replace the standard startup ! 101: routine by one which arranges to gather profiling data ! 102: for later examination by ! 103: .IR prof (1). ! 104: .TP ! 105: .B -pg ! 106: Like ! 107: .B -p ! 108: but for ! 109: .IR gprof ! 110: instead of ! 111: .IR prof (1). ! 112: .TP ! 113: .B -S ! 114: Compile the named C programs, and leave the ! 115: assembler-language output in ! 116: .B .s ! 117: files. ! 118: .TP ! 119: .B -E ! 120: Run the preprocessor ! 121: on the named C programs, and send the result to the ! 122: standard output. ! 123: .TP ! 124: .B -C ! 125: Prevent the preprocessor from eliding comments. ! 126: .TP ! 127: .BI -D\*S name=def ! 128: .br ! 129: .ns ! 130: .TP ! 131: .BI -D \*Sname ! 132: Define the ! 133: .I name ! 134: to the preprocessor, ! 135: as if by ! 136: .LR #define . ! 137: If no definition is given, the name is defined as ! 138: .LR 1 . ! 139: .I Lcc ! 140: predefines a few symbols on most machines; option ! 141: .B -v ! 142: exposes them. ! 143: .TP ! 144: .BI -U \*Sname ! 145: Remove any initial definition of ! 146: .IR name . ! 147: .TP ! 148: .BI -I \*Sdir ! 149: .L #include ! 150: files whose names do not begin with ! 151: .L / ! 152: are always ! 153: sought first in the directory ! 154: of the ! 155: .I file ! 156: argument, ! 157: then in directories named in ! 158: .B -I ! 159: options, ! 160: then in directories on a standard list. ! 161: .PP ! 162: These options are peculiar to ! 163: .IR cc : ! 164: .TP ! 165: .B -P ! 166: Run the preprocessor on each ! 167: .L .c ! 168: file. ! 169: Produce no line numbers. ! 170: Place results in ! 171: .L .i ! 172: files. ! 173: .TP ! 174: .B -R ! 175: Cause ! 176: .IR as (1) ! 177: to make initialized variables shared and read-only. ! 178: .TP ! 179: .BI -B \*Sstring ! 180: Find substitute compiler passes in the files named ! 181: .I string ! 182: with the suffixes cpp, ccom and c2. ! 183: If ! 184: .I string ! 185: is empty, use a standard backup version. ! 186: .TP ! 187: .BR -t [ p012 ] ! 188: Find only the designated compiler passes in the ! 189: files whose names are constructed by a ! 190: .B -B ! 191: option. ! 192: In the absence of a ! 193: .B -B ! 194: option, the ! 195: .I string ! 196: is taken to be ! 197: .FR /usr/c/ . ! 198: .PP ! 199: These options are peculiar to ! 200: .IR lcc : ! 201: .TP ! 202: .B \-N ! 203: Do not search standard directories for include files. ! 204: Omit non-ANSI language extensions. ! 205: .TP ! 206: .B \-A ! 207: Warn about calls to functions without prototypes. ! 208: .TP ! 209: .BI \-d n ! 210: Generate jump tables for switches with density at least ! 211: .IR n , ! 212: a floating-point constant between zero and one, ! 213: 0.5 by default. ! 214: .TP ! 215: .B \-P ! 216: Write declarations for all defined globals on standard error. ! 217: .TP ! 218: .B \-n ! 219: Produce code ! 220: that reports and aborts upon dereferencing a zero pointer. ! 221: .TP ! 222: .B \-M ! 223: Run only the preprocessor to generate ! 224: .IR make (1) ! 225: dependencies on the standard output. ! 226: .TP ! 227: .B \-T ! 228: Allow ! 229: .SM ANSI ! 230: standard trigraph sequences. ! 231: .TP ! 232: .BI \-B str ! 233: Use the compiler ! 234: .IB str rcc ! 235: instead of the default version. ! 236: .I Str ! 237: usually ends with a slash. ! 238: .TP ! 239: .B \-v ! 240: Report compiler steps (and some version numbers) as ! 241: they are executed. ! 242: A second ! 243: .B \-v ! 244: causes steps to be reported but not executed. ! 245: .PP ! 246: .I Lcc ! 247: supports ! 248: .BI asm( string ). ! 249: The given string constant is copied to the generated ! 250: assembly language output with occurrences of ! 251: .BI % name ! 252: replaced by the address or register for identifier ! 253: .I name ! 254: if it is visible. ! 255: Otherwise, ! 256: .BI % name ! 257: is simply copied to the output. ! 258: Wide-character literals are treated as plain char literals; ! 259: ints and long ints are the same size, ! 260: as are doubles and long doubles. ! 261: .SH EXAMPLES ! 262: .TP ! 263: .L ! 264: lcc -N -I/usr/include/libc file.c ! 265: Use local include files instead of ! 266: .SM ANSI ! 267: standard ones, which lack most functions of Section 2 ! 268: of this manual, and often disagree (especially about ! 269: .BR const ) ! 270: with those in Section 3. ! 271: See ! 272: .IR intro (3). ! 273: .SH FILES ! 274: .PP ! 275: Different machines use different file names, so this list is ! 276: only representative. ! 277: .I Lcc ! 278: option ! 279: .B -v ! 280: exposes the correct names. ! 281: .TF /usr/include/libc ! 282: .TP ! 283: .F a.out ! 284: linked output ! 285: .TP ! 286: .F /tmp/ctm* ! 287: temporary ! 288: .TP ! 289: .F /lib/cpp ! 290: preprocessor, ! 291: .IR cpp (8) ! 292: .TP ! 293: .F /usr/lib/gcc-cpp ! 294: .SM ANSI ! 295: preprocessor ! 296: .TP ! 297: .F /lib/ccom ! 298: .I cc ! 299: compiler proper ! 300: .TP ! 301: .F /lib/c2 ! 302: optional optimizer for ! 303: .I cc ! 304: .TP ! 305: .F /bin/as ! 306: assembler, ! 307: .IR as (1) ! 308: .TP ! 309: .F /usr/lib/rcc ! 310: .I lcc ! 311: compiler proper ! 312: .TP ! 313: .F /lib/crt0.o ! 314: runtime startoff ! 315: .TP ! 316: .F /lib/mcrt0.o ! 317: startoff for profiling ! 318: .TP ! 319: .F /lib/libc.a ! 320: standard library, see ! 321: .IR intro (3) ! 322: .TP ! 323: .F /usr/include ! 324: directory for ! 325: .I cc ! 326: .L #include ! 327: files ! 328: .TP ! 329: .F /usr/include/lcc ! 330: directory for ! 331: .SM ANSI ! 332: standard ! 333: .L #include ! 334: files ! 335: .TP ! 336: .F /usr/include/libc ! 337: directory for local ! 338: .I lcc ! 339: include files ! 340: .SH "SEE ALSO" ! 341: .IR lint (1), ! 342: .IR ld (1), ! 343: .IR strip (1), ! 344: .IR nm (1), ! 345: .IR prof (1), ! 346: .IR cin (1), ! 347: .IR adb (1), ! 348: .IR pi (9.1), ! 349: .IR c++ (1) ! 350: .br ! 351: B. W. Kernighan and D. M. Ritchie, ! 352: .I The C Programming Language, ! 353: 2nd Ed., Prentice-Hall, 1988 ! 354: .SH BUGS ! 355: .I Cc ! 356: cannot handle the ! 357: .L -y ! 358: flag of ! 359: .I ld. ! 360: .br ! 361: .I Lcc ! 362: currently uses the pre-ANSI library. ! 363: .SH MACHINE DEPENDENCIES ! 364: .SS VAX ! 365: .B -pg ! 366: is unimplemented. ! 367: .br ! 368: .I Cc ! 369: and ! 370: .I lcc ! 371: use incompatible bit-field layouts and structure return conventions. ! 372: .SS MIPS ! 373: .I Lcc ! 374: does not implement ! 375: .B -p ! 376: or ! 377: .BR -pg , ! 378: and its ! 379: .B -g ! 380: supports breakpoints but not the examination of variables. ! 381: .br ! 382: .I Cc ! 383: and ! 384: .I lcc ! 385: use incompatible bit-field layouts. ! 386: .SS Sun ! 387: .I Lcc ! 388: options ! 389: .B -Bdynamic ! 390: and ! 391: .B -Bstatic ! 392: give the binding strategy; see ! 393: .IR ld (1). ! 394: .br ! 395: .I Cc and ! 396: .I lcc ! 397: use incompatible bit-field layouts and structure return conventions.
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.