CC(1) CLIX CC(1)
NAME
CC - Runs the C++ translator
SYNOPSIS
CC [flag ... ] file ...
FLAGS
-E Runs only cpp on the C++ source files and send the result to
stdout.
-F Runs only cpp and cfront on the C++ source files, and sends the
result to stdout. The output contains #line directives. (The
-Fc flag is identical to the -F flag and will be unrecognized
after version 2.1 of the software.)
-.suffix Places the output from each input file in a file with the
specified suffix in the current directory when used in
combination with the -E or -F flags.
+a[01] Specifies a style of declarations to produce. The C++ compiler
can generate either ANSI C-conforming or K&R C-style
declarations. The default, +a0, causes the compiler to produce
K&R C-style declarations. The +a1 flag causes the compiler to
produce ANSI C-conforming declarations.
+d Does not expand inline functions inline.
+e[01] Used only on classes for which virtual functions are present,
and all the virtual functions are either defined as inline or
pure. In this circumstance, this flag optimizes a program to
use less space by ensuring that only one virtual table per
class is generated. The +e1 flag causes virtual tables to be
external and defined. The +e0 flag causes virtual tables to be
external but only declared. This flag is ignored for any class
that contains an out-of-line virtual function.
+i Leaves the intermediate ..c C files in the current directory
during the compilation process. These files do not contain any
preprocessing directives, although the files passed to the C
compiler do.
-p Arranges for the compiler to produce code that counts the
number of times each routine is called; also, if link editing
occurs, replaces standard startup routine with one that
automatically calls monitor() at the start and arranges to
write a mon.out file at normal object program termination. An
execution profile can then be generated by using prof.
2/94 - Intergraph Corporation 1
CC(1) CLIX CC(1)
+p Disallows all anachronistic constructs. Ordinarily the
translator warns about anachronistic constructs. Under +p (for
``pure''), the translator does not compile code containing
anachronistic constructs. See the AT&T C++ Language System
Product Reference Manual for a list of anachronisms.
+w Warns about constructs that are likely to be mistakes,
nonportable, or inefficient. Without the +w flag, the compiler
issues warnings only about constructs that are almost certainly
errors.
+xfile Reads a file of size and alignments created by compiling and
executing szal.c. The form of the created file is identical to
the entries in <size.h>. This flag is useful for cross
compilations and for porting the translator. See the AT&T C++
Language System Release 2.0 Release Notes for more information.
DESCRIPTION
The CC (capital CC) command translates C++ source code to C source code,
and then calls the appropriate compiler. The command uses cpp for
preprocessing, cfront for syntax and type checking, and cc for code
generation.
The CC command takes arguments ending in .c, .C, or .i Files with a .c
extension are assumed to be C source code; files with .C extensions are
assumed to be C++ source programs. The .i files are presumed to be the
output of cpp. Files with the extensions .s and .o are also accepted by
the CC command and passed to cc.
For each C++ source file, CC creates a temporary file in /usr/tmp, which
contains the generated C file for compilation with cc. This file has the
same name as the file specified on the command line and is suffixed with
.c. The -F -.suffix flag saves a copy of this file in the current
directory with the name file.suffix. The +i flag saves an edited copy of
the generated C code in the current directory with the name file..c.
In addition to the flags described above, CC accepts other flags and
passes them on to the C compilation system tools. See cpp(1) for
preprocessor flags, cc(1) for c compiler flags, ld(1) for link editor
flags, and as(1) for assembler flags.
EXAMPLES
1. This example shows the command line used to compile the C++ file
myfile.C into an object file myfile.o. The -O flag turns on the
compiler optimizers while the +a1 flag forces cfront (the C++
translator) to produce C code with ANSI prototypes suitable for an
ANSI compliant compiler.
CC -O +a1 -c myfile.C
2 Intergraph Corporation - 2/94
CC(1) CLIX CC(1)
2. This command line compiles the files file1.C and file2.C with compiler
optimizers and links them to the executable file foo.
CC -O file1.C file2.C -o foo
FILES
file.[Cc] C++ source file.
file..c Optional C++ cfront output.
file.i C++ source after preprocessing.
file.s Assembly language file.
file.o Object file.
a.out Linked output.
/lib/cpp C preprocessor.
/bin/cc C compiler.
/lib/libc.a C standard library.
CCROOTDIR/CC C++ translator.
CCROOTDIR/cfront C++ translator front end.
CCROOTDIR/patch or munch
Post-link editor.
CCROOTDIR/c++filt Name demangler for diagnostic messages.
CCLIBDIR/libC.a C++ standard library.
CCLIBDIR/libtask.a C++ coroutine library.
CCLIBDIR/libcomplex.a C++ complex arithmetic library.
I/CC Standard directory for #include files.
Standard variables are defined as follows:
LCCROOTDIR /usr/bin
CCLIBDIR /usr/lib
I /usr/include/CC
2/94 - Intergraph Corporation 3
CC(1) CLIX CC(1)
DIAGNOSTICS
The diagnostics produced by CC are intended to be self-explanatory.
Occasional messages may be produced by the assembler or link editor.
EXIT VALUES
The exit values are not valid.
RELATED INFORMATION
Commands: acc(1), cc(1), prof(1), ld(1), cpp(1), as(1)
Functions: monitor(3)
Bjarne Stroustrup, The C++ Programming Language, Addison-Wesley 1986
B. W. Kernighan and D. M. Ritchie, The C Programming Language, Prentice-
Hall 1978
AT&T C++ Language System Release 2.1 Release Notes
4 Intergraph Corporation - 2/94