CC(1) — Kubota Pacfic Computer Inc. (C Programming Language Utilities)
NAME
cc − C compiler
SYNOPSIS
cc [ options ] [ files ] [ options ] [ files ]
DESCRIPTION
The cc command is an interface to the Titan 1500/3000 Compilation System. The compilation tools consist of a preprocessor, compiler, beautifier, assembler, and link editor. The cc command processes the supplied options and then executes the various tools with the proper arguments. The cc command accepts several types of files as arguments:
Files whose names end with .c are taken to be C source programs and may be preprocessed, compiled, optimized, assembled, and link edited. The compilation process may be stopped after the completion of any pass if the appropriate options are supplied. If the compilation process runs through the assembler then an object program is produced and is left in the file whose name is that of the source with .o substituted for .c. However, the .o file is normally deleted if a single C program is compiled and then immediately link edited. In the same way, files whose names end in .s are taken to be assembly source programs, and may be assembled and link edited; and files whose names end in .i are taken to be preprocessed C source programs and may be compiled, optimized, assembled and link edited. Files whose names do not end in .c, .s or .i are handed to the link editor.
Since the cc command usually creates files in the current directory during the compilation process, it is necessary to run the cc command in a directory in which a file can be created.
The following options are interpreted by cc:
−c Suppress the link editing phase of the compilation, and do not remove any produced object files.
−Dname
Define name to have the value of 1, to the preprocessor.
−Dname=val
Define name to have the value of val, to the preprocessor.
−E Run only cpp(1) on the named C programs, and send the result to the standard output.
−full_report
Produce a detailed vectorizer report.
−g Generate additional information needed for the use of dbg(1). Force optimization level to zero.
−I Suppress the default searching for preprocessor included files in /usr/include.
−Idir Search for include files in dir.
−i Suppress the automatic production of #ident information.
−inline
Instruct the compiler to enable function inlining.
−Npaths=name.in
Instruct the compiler to make use of the database of functions listed in the catalog name.in as the source for inlining.
−NW
Suppress compiler warnings.
−n Suppress the standard C startup routine.
−O0 Turn off all optimizations.
−O1 Perform common subexpression elimination and instruction scheduling. If nothing is specified, this -O1 is the default setting of compiler optimization level.
−O2 Perform -O1 and vectorization.
−O3 Perform -O2 and parallelization.
−O This is synonymous with -O1.
−o filename
Place the output into filename.
−P Run only cpp(1) on the named C programs and leave the result in corresponding files suffixed .i. This option is passed to cpp(1).
−p Generate code to profile the loaded program during execution. (See prof(1) and mkprof(1).)
−ploop
Generate code that allows loops within a single routine to be profiled separately.
-r Produce a relocatable output file.
−S Compile and do not assemble the named C programs, and leave the assembler output in corresponding files suffixed .s.
−safe=loops
Guarantee that all for loops within the program have upper bounds that do not vary within the loop.
−safe=parms
Declare that input arguments do not have hidden aliases.
−safe=ptrs
Declare that pointers do not have hidden aliases.
−subcheck
Produce code to check at runtime to ensure that each array element accessed is actually part of the appropriate array. However, at optimization level 02 and higher, this option ignores the vector mask. This means that some operations may generate subscriptranges that are not actually in the code.
−Uname
Undefine name.
−V Print version information.
−v Generate more messages tracking the progress of the compilation.
−vector_c
This is equivalent to specifying -safe=parms -safe=loops.
−vreport
Invoke the vector reporting facility and tell the user what vectorization has been done. A detailed listing is provided for each loop nest and includes suggestions for achieving better performance.
−vsummary
Invoke the vector reporting facility and tell the user what vectorization has been done. Print out what statements are and are not vectorized in each loop. This output is in Fortran-like notation.
−w Suppress warning messages during compilation.
−43 Use this option to get 4.3 BSD header files and libraries.
The cc command recognizes −B hhhhhhh, −D hhhhhhh, −esym, −L, −Ldir, −ltag, −m, −N, −ofilename, −opct, −p, −r, −s, −T hhhhhhh, −t, −uname, and −yname and passes these options and their arguments directly to the loader. See the manual pages for cpp(1) and ld(1) for descriptions.
Other arguments are taken to be C compatible object programs, typically produced by an earlier cc run, or perhaps libraries of C compatible routines and are passed directly to the link editor. These programs, together with the results of any compilations specified, are link edited (in the order given) to produce an executable program with name a.out.
FILES
file.c C source file
file.o object file
file.s assembly language file
a.out link edited output
/lib/crt0.o start-up routine
TMPDIR/∗ temporary files
/lib/cpp preprocessor, cpp(1)
/bin/as assembler, as(1)
/bin/ld link editor, ld(1)
/lib/libc.a} standard C library
TMPDIR is usually /usr/tmp but can be redefined by setting the environment variable TMPDIR [see tempnam() in tmpnam(3S)].
SEE ALSO
as(1), dbg(1), ld(1), cpp(1), mkprof(1), prof(1)
Kernighan, B. W., and Ritchie, D. M., The C Programming Language, Prentice-Hall, 1978. Harbison, S. P., and Steele, G. L. Jr., C: A Reference Manual, Prentice-Hall, Second Edition, 1987.
NOTES
By default, the return value from a compiled C program is completely random. The only two guaranteed ways to return a specific value is to explicitly call exit(2) or to leave the function main() with a “return expression;” construct.
September 02, 1992