jon@cit-vax.Caltech.Edu (Jonathan P. Leech) (03/24/86)
Summary: Expires: Sender: Followup-To: Organization : California Institute of Technology Keywords: The manual page for CC is not supplied in online form. I hacked up our Release E manual page to look like that in the Release 1 manual. Here it is. It should be run through tbl(1) before installing in /usr/man. ---------------------------------------------------------------------- .fp 1 R .fp 2 I .fp 3 B .ds f. CC.1 .TH CC 1 .SH NAME CC \- C++ translator .SH SYNOPSIS .B CC [ option ] ... file ... .SH DESCRIPTION .B CC (capital CC) translates C++ source code to C source code. The command uses \fIcpp\fR(1) for preprocessing, \fIcfront\fR for syntax and type checking, and \fIcc\fR(1) for code generation. .B CC takes arguments ending in .TP .B .c 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 .B .o substituted for .BR .c . .TP .B .s to be assembly source programs and assembled, producing .B .o files. .PP .B CC interprets the following options: .TP .B \-C Prevent .I cpp and .I cfront from removing comments. .TP .B \-E Run only .I cpp on the .B .c files, and send the result to standard output. .TP .B \-F Run only .I cpp and .I cfront on the .B .c files, and send the result to standard output. .TP .B \-Fc Like the .B \-F option, but the output is C source code suitable as a .B .c file for .IR cc(1) . .TP .BI \-. suffix Instead of using standard output for the .B \-E , .B \-F or .B \-Fc options, place the output from each .B .c file on a file with the corresponding .IR .suffix . .TP .B \+V Accept regular C function declarations; use the .I /usr/include directory \fB#include\fR files. Support for this option is not guaranteed in future releases .TP .B +L Generate source line number information using the format "#line %d" instead of "#%d". .TP .B +x\fIfile\fR Read a file of sizes and alignments. Each line contains three fields: a type name, the size (in bytes), and the alignment (in bytes). This option is useful for cross compilations. .TP .B \+S Spy on .IR cfront ; that is, print some information on .IR stderr . .sp See .I ld(1) for loader options, .I as(1) for assembler options, .I cc(1) for code generation options, and .I cpp(1) for preprocessor options. .SH FILES \fR .TS tab(@); l l. file.c@input file file..c@cfront output file.o@object file a.out@linked output /lib/cpp@C preprocessor cfront@C front end /bin/cc@C compiler /lib/libc.a@T{ standard C library; see Section (3) in the \fIUNIX System V Programmer Reference Manual\fR T} /lib/libC.a@C++ library /usr/include/CC@standard directory for \fB#include\fR files /usr/include@standard directory for \fB#include\fR files when the \fB+V\fR option is used .TE .SH "SEE ALSO" cc(1), monitor(3), prof(1), ld(1). .br Bjarne Stroustrup, .I The C++ Programming Language, Addison-Wesley 1986. .br B. W. Kernighan and D. M. Ritchie, .I The C Programming Language, Prentice-Hall 1978. .br .SH DIAGNOSTICS The diagnostics produced by .I CC itself are intended to be self-explanatory. Occasional messages may be produced by the assembler or loader. No messages should be produced by .IR cc(1) . .SH BUGS Some ``used before set'' warnings are wrong. .sp There is a (temporary) hole in the C++ type system allowing C++ programs to use C libraries. When a name is overloaded the first function of that name (only) can be linked to a library compiled by \fIcc\fR. Thus, the declaration .IP overload read(int,char*,int), read(vector*); .LP will allow the system call .IR read (2) to be used together with user defined functions of the same name. Use of this facility may lead to unexpected behavior. For example, had the other .I read() been declared first, or had the system's .I read() not been declared, then the user's .I read() would have been called by library functions like .IR scanf (3). .br