CC - C++ Translator
CC [-E] [-F|-Fc] [-.suffix] [+i] [+L] [+x file] [+e0|+e1] [+d] [+w] [+p] [+a0|+a1] file ...
e have two compilation systems for C++: the current version of the
Sun C++ v2.0 compiler (CC), and the Saber C++ (C++ v2.0) development
environment.
When you run ``CC'' you get the Sun C++ compiler by
default. Your must run ``CC_CenterLine'' to get the CenterLine C++
compiler.
Capabilities
- CC (capital CC) translates C++ source code to C source code. The
command uses cpp(1) for preprocessing, cfront for syntax and type
checking, and cc(1) for code generation.
- CC takes arguments ending in .c, .C, .cc, .cxx or .i to be C++
source programs. .i files are presumed to be the output of cpp(1).
Both .s and .o files are also accepted by the CC command and passed to
cc(1).
Most used Options
CC interprets the following options:
- -g Produce additional symbol table information for dbx(1) and
dbxtool(1) and pass the -g option to cc(1) and the -lg flag to ld(1).
- +i Produce intermediate ..c C language file in the
current directory.
- +L Generate source line number information using the format
"#line %d" instead of "# %d".
- +d Do not expand inline functions.
- +w Warn about all questionable constructs. Without the +w
option, the translator issues warnings only about constructs that are
almost certainly problems.
- +p Disallow all anachronistic constructs. Ordinarily the
translator warns about anachronistic constructs; under +p (for
``pure''), the translator will not compile code containing
anachronistic constructs, such as ``assignment to this.'' See the
AT&T C++ Language System Product Reference Manual for a list of
anachronisms.
See also
Books
- Bjarne Stroustrup, The C++ Programming Language, AddisonWesley
1986.
- B. W. Kernighan and D. M. Ritchie, The C Programming Language,
Prentice-Hall 1978.
- AT&T C++ Language System Release 2.0, Product Reference Manual
Notes
You can use shell variables to tell the C++ translator script CC that
various passes are located in unusual places or have unusual names.
For example, if you have your own version of the C compiler called myC
, you can set and export the shell variable with a line like this:
ccC+/usr/bin/myC;export ccC
Note that you have to export the variable. If you are using the c-shell:
setenv ccC /usr/bin/myC
For more, man CC_sun
What the Gurus have to say...