OCC(1)

OCC - old (cfront-based) C++ compiler

As shipped in IRIX 6.5. First release of IRIX 6.5.

NAME
     OCC - old (cfront-based) C++ compiler

SYNOPSIS
     OCC [ option ] ... file ...
     CC -use_cfront [ option ] ... file ...

DESCRIPTION
     OCC (capital OCC) invokes the cfront translator to translate C++ source
     code to C source code.  Its normal operation is then to invoke the C
     compiler cc(1) to generate an object file.

     CC will invoke OCC if given the -use_cfront option. In the subsequent
     discussion below, CC refers to OCC.

     CC takes arguments ending in .C, .c, .c++, .cc, or .cxx to be C++ source
     programs.  Files with the suffixes .a , .o, and .s, are also accepted by
     the CC command and passed to cc(1).

     CC defines the same symbols for preprocessing as cc, except that
     __cplusplus and _LANGUAGE_C_PLUS_PLUS are defined, and LANGUAGE_C and
     _LANGUAGE_C are not.

     By default, CC invokes the ANSI preprocessor and generates ANSI C
     intermediate code, just as if -xansi were specified on the command line.
     Note that when the ANSI preprocessor is used, the symbol __ANSI_CPP is
     always defined.  Normally, programmers will not care about the
     intermediate code, but they may want to do K&R-style preprocessing.  The
     -cckr command line option makes this possible.

     CC interprets the following options (see ld(1) for load-time options):

     -c   Produce binaries only, suppressing the link phase.

     -cckr
          Do K&R preprocessing and generate K&R C.

     -xansi
          Do ANSI preprocessing and generate ANSI C.  This is the default.  If
          more than one of -cckr and -xansi is specified, the one last on the
          command line prevails.

     -E      Run only the preprocessor on the C++ source files and send the
             result to standard output.

     -F      Run only the preprocessor and C++-to-C translator on the C++
             source files.  The output is C source code suitable as a .c file
             for cc(1).

     +I      Save the intermediate C source file with suffix ..c in the
             current directory.

     +L      Output line numbers to intermediate file in #line format.

     -.suffix
             Instead of using standard output for the -E or -F options, place
             the output from each C++ source file on a file with the
             corresponding .suffix.

     -MDupdate filename
             While compiling, update filename to contain header, library, and
             runtime make(1) dependencies for CC's output file.

     -all    Link in all of the objects from the archive following this flag.
             Used in conjunction with the -shared flag when creating a shared
             object.

     +d      Suppress inline expansion of functions declared as inline.

     -dollar Allow the dollar sign ($) as a character in C++ identifiers.

     -n      Print commands generated by CC but do not execute them.

     -nofilt Normally, CC pipes the error output from the link phase through
             the filter /usr/lib/c++/c++filt so that the names of undefined
             symbols will be translated from their internal, encoded
             ("mangled") form to a more easily readable form:  for example,
             foo__Fii will be translated to foo(int, int).  -nofilt suppresses
             this filtering operation.

     -o output
             Name the final output file output.

     +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 3.0 C++
             Product Reference Manual for a list of anachronisms.

     -shared Create a dynamic shared object (DSO) as the final output file.

     +v      print commands invoked by CC as they are executed (verbose
             output).  To print commands invoked by cc , use the -v option.

     +w      Warn about all questionable constructs.  Without the +w option,
             the translator issues warnings only about constructs that are
             almost certainly problems.

     +a[01]  The translator can generate either ANSI C style or "Classic C"
             (also known as K&R C) style declarations.  The +a option
             specifies which style of declarations to produce.  +a0 causes the
             translator to produce "Classic C" style declarations.  +a1, the
             default, causes the translator to produce ANSI C style
             declarations.

     The template instantiation system adds several options to CC.

     -pta      Instantiate a whole template class rather than only those
               members that are needed.

     -ptesuffix
               Use suffix as the standard source suffix instead of .c.  Only
               the standard suffixes .C, .c++, .cc, and .cxx are allowed.

     -ptn      Change the default instantiation behavior for one-file programs
               to that of larger programs, where instantiation is broken out
               separately and the repository updated.  One-file programs
               normally have instantiation optimized so that instantiation is
               done into the application object itself.

     -ptrpathname
               Specify a repository, with ./ptrepository the default.  If
               several repositories are given, only the first is writable, and
               the default repository is ignored unless explicitly named.

     -pts      Split instantiations into separate object files, with one
               function per object (including overloaded functions), and all
               class static data and virtual functions grouped into a single
               object.

     -ptv      Turn on verbose or verify mode, which displays each phase of
               instantiation as it occurs, together with the elapsed time in
               seconds that phase took to complete.  Use of this option is
               recommended if you are new to templates.  With verbose mode,
               the reason why an instantiation is done and the exact CC
               command used are displayed.

     In release 3.0, -pts and -pta cannot be used together, that is, -pts can
     only be used to split up needed functions rather than all functions.

     The template instantiation mechanism uses the system utilities sort and
     grep. It uses the search path to find these utilities, so if there is a
     version of one of them in the search path ahead of the standard system
     version, surprising errors may occur.

     -D, -I, -U, -P, and -M are passed to the preprocessor (see cpp(1)).  -M
     also causes processing to stop after the preprocessor.  It is used to
     generate make dependencies, which are written to the standard output.
     All other options are passed to the C compiler, except the -j option,
     which is not supported by CC.

FILES
     file.{C,c,c++,cc,cxx}
                          C++ source files.
     file..c              cfront output
     file.o               object file
     a.out                linked output
     /usr/bin/CC          C++ driver
     /usr/lib/cpp         C preprocessor
     /usr/lib/c++/cfront  C++-to-C translator
     /usr/bin/cc          C compiler
     /usr/lib/c++/markc++ mark object files as C++
     /usr/lib/c++/c++patch
                          link global constructors and destructors
     /usr/lib/libC.a      C++ library
     /usr/lib/libc.a      standard C library; see Section (3) in the UNIX
                          System V Programmer Reference Manual
     /usr/include/CC      standard directory for C++-specific header files.
SEE ALSO
     Margaret Ellis and Bjarne Stroustrup, The Annotated C++ Reference Manual,
     Addison-Wesley 1990.  cc(1), ld(1), cpp(1), as(1), mips2(5).
DIAGNOSTICS
     The diagnostics produced by CC itself are intended to be self-
     explanatory.  Occasional messages may be produced by ld(1).  No messages
     should be produced by cc(1).
NOTES
     CC always defines the symbol __cplusplus to the preprocessor.
     The  -j option is not supported by OCC. (It is supported by CC).   -O3
     compilations require all the source files to be listed on a single
     commandline.