|
|
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: .B -b ! 210: produce code that writes an expression-level profile into prof.out. ! 211: .IR bprint (1) ! 212: produces an annotated listing, and ! 213: .B -Wf-a ! 214: uses the profile to improve register assignments. ! 215: .TP ! 216: .BI \-d n ! 217: Generate jump tables for switches with density at least ! 218: .IR n , ! 219: a floating-point constant between zero and one, ! 220: 0.5 by default. ! 221: .TP ! 222: .B \-P ! 223: Write declarations for all defined globals on standard error. ! 224: .TP ! 225: .B \-n ! 226: Produce code ! 227: that reports and aborts upon dereferencing a zero pointer. ! 228: .TP ! 229: .B \-M ! 230: Run only the preprocessor to generate ! 231: .IR make (1) ! 232: dependencies on the standard output. ! 233: .TP ! 234: .B \-t ! 235: Produce code to print trace messages at function entry and exit. ! 236: .TP ! 237: .BI -Wp "opt" ! 238: Pass preprocessor option ! 239: .I opt ! 240: to the (Gnu) preprocessor. ! 241: For example, ! 242: .B -Wp-T ! 243: allows ! 244: .SM ANSI ! 245: trigraph sequences. ! 246: .HP ! 247: .BI -Wa opt, ! 248: .BI -Wl opt, ! 249: .BI -Wf opt ! 250: .br ! 251: Pass option ! 252: .IR opt ! 253: to the assembler ! 254: .RI ( as (1)), ! 255: loader ! 256: .RI ( ld (1)), ! 257: or compiler proper. ! 258: .TP ! 259: .BI \-B str ! 260: Use the compiler ! 261: .IB str rcc ! 262: instead of the default version. ! 263: .I Str ! 264: usually ends with a slash. ! 265: .TP ! 266: .B \-v ! 267: Report compiler steps (and some version numbers) as ! 268: they are executed. ! 269: A second ! 270: .B \-v ! 271: causes steps to be reported but not executed. ! 272: .PP ! 273: .I Lcc ! 274: supports ! 275: .BI asm( string ). ! 276: The given string constant is copied to the generated ! 277: assembly language output with occurrences of ! 278: .BI % name ! 279: replaced by the address or register for identifier ! 280: .I name ! 281: if it is visible. ! 282: Otherwise, ! 283: .BI % name ! 284: is simply copied to the output. ! 285: Wide-character literals are treated as plain char literals; ! 286: ints and long ints are the same size, ! 287: as are doubles and long doubles. ! 288: .SH EXAMPLES ! 289: .TP ! 290: .L ! 291: lcc -N -I/usr/include/libc file.c ! 292: Use local include files instead of ! 293: .SM ANSI ! 294: standard ones, which lack most functions of Section 2 ! 295: of this manual, and often disagree (especially about ! 296: .BR const ) ! 297: with those in Section 3. ! 298: See ! 299: .IR intro (3). ! 300: .SH FILES ! 301: .PP ! 302: Different machines use different file names, so this list is ! 303: only representative. ! 304: .I Lcc ! 305: option ! 306: .B -v ! 307: exposes the correct names. ! 308: .TF /usr/include/libc ! 309: .TP ! 310: .F a.out ! 311: linked output ! 312: .TP ! 313: .F /tmp/ctm* ! 314: temporary ! 315: .TP ! 316: .F /lib/cpp ! 317: preprocessor, ! 318: .IR cpp (8) ! 319: .TP ! 320: .F /usr/lib/gcc-cpp ! 321: .SM ANSI ! 322: preprocessor ! 323: .TP ! 324: .F /lib/ccom ! 325: .I cc ! 326: compiler proper ! 327: .TP ! 328: .F /lib/c2 ! 329: optional optimizer for ! 330: .I cc ! 331: .TP ! 332: .F /bin/as ! 333: assembler, ! 334: .IR as (1) ! 335: .TP ! 336: .F /usr/lib/rcc ! 337: .I lcc ! 338: compiler proper ! 339: .TP ! 340: .F /lib/crt0.o ! 341: runtime startoff ! 342: .TP ! 343: .F /lib/mcrt0.o ! 344: startoff for profiling ! 345: .TP ! 346: .F /lib/libc.a ! 347: standard library, see ! 348: .IR intro (3) ! 349: .TP ! 350: .F /usr/include ! 351: directory for ! 352: .I cc ! 353: .L #include ! 354: files ! 355: .TP ! 356: .F /usr/include/lcc ! 357: directory for ! 358: .SM ANSI ! 359: standard ! 360: .L #include ! 361: files ! 362: .TP ! 363: .F /usr/include/libc ! 364: directory for local ! 365: .I lcc ! 366: include files ! 367: .SH "SEE ALSO" ! 368: .IR lint (1), ! 369: .IR ld (1), ! 370: .IR strip (1), ! 371: .IR nm (1), ! 372: .IR prof (1), ! 373: .IR bprint (1), ! 374: .IR cin (1), ! 375: .IR adb (1), ! 376: .IR pi (9.1), ! 377: .IR c++ (1) ! 378: .br ! 379: B. W. Kernighan and D. M. Ritchie, ! 380: .I The C Programming Language, ! 381: 2nd Ed., Prentice-Hall, 1988 ! 382: .SH BUGS ! 383: .I Cc ! 384: cannot handle the ! 385: .L -y ! 386: flag of ! 387: .I ld. ! 388: .br ! 389: .I Lcc ! 390: currently uses the pre-ANSI library. ! 391: .SH MACHINE DEPENDENCIES ! 392: .SS VAX ! 393: .B -pg ! 394: is unimplemented. ! 395: .br ! 396: .I Cc ! 397: and ! 398: .I lcc ! 399: use incompatible bit-field layouts and structure return conventions. ! 400: .SS MIPS ! 401: .I Lcc ! 402: does not implement ! 403: .B -p ! 404: or ! 405: .BR -pg , ! 406: and its ! 407: .B -g ! 408: supports breakpoints but not the examination of variables. ! 409: .br ! 410: .I Cc ! 411: and ! 412: .I lcc ! 413: use incompatible bit-field layouts. ! 414: .SS Sun ! 415: .I Lcc ! 416: options ! 417: .B -Bdynamic ! 418: and ! 419: .B -Bstatic ! 420: give the binding strategy; see ! 421: .IR ld (1). ! 422: .br ! 423: .I Cc and ! 424: .I lcc ! 425: 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.