CC Aegis CC
NAME
cc - compile a C program
SYNOPSIS
cc source_file [-abs] [-ac] [-align|-nalign] [-b [file] |-nb]
[-bss|-nbss] [-comchk|-ncomchk]
[-cond|-ncond] [-cpu id]
[-db|-dbs|-dba|-ndb] [-def name[=value]]
[-es|esf [pathname]] [-exp|nexp] [-frnd]
[-idir pathname] [indexl|nindexl] [-info level]
[-inlib pathname] [-l|-nl]
[-map|-nmap] [-mgbl|-nmgbl]
[-msgs|-nmsgs] [-opt|-nopt] [n]] [-pic] [-prof]
[-runtype systype] [-std|-nstd]
[-systype systype] [-talign]
[-type|-ntype] [-uline|-nuline]
[-version] [-warn|-nwarn]
DESCRIPTION
The C compiler translates a C source module into a binary object module,
which can be executed or used as input to the binder. Source files may
be a maximum of 32000 lines long. For more information on the C
compiler, see the Domain C Language Reference.
Note:
There is a homonymous DM command: cc (create_copy) - create a copy
of an existing window. Type "help cc_dm" for details.
ARGUMENTS
source_file (required)
Specify the pathname of the source file to be compiled.
If the pathname ends with ".c", you need not specify this
suffix. If it is absent, the compiler automatically
appends ".c" to the pathname before it searches for the
file. This argument must precede any options specified
(except for . -version, which does not take a pathname).
OPTIONS
Default options are indicated by "(D)".
-abs Force the compiler to use long absolute addressing mode
for all external references. This option implies a
special form of absolute code so you should not use it
with -ac or -pic.
-ac (D) Produce absolute code. This is the default. Other
options are -abs, which forces the compiler to use long
absolute addressing modes for all external references, and
-pic, which forces the compiler to produce position-
independent code.
-align (D) Aligns data on longword boundaries, which makes programs
execute faster on DN460/660 nodes (increases size of
generated code slightly).
-nalign No longword alignment.
-b [file] (D) Generate binary file. The optional pathname specifies a
name for the output file. If you omit the pathname, the
compiler appends ".bin" to the source file's name in
place of ".c", and writes the binary to that file. If the
compilation fails due to a fatal error in the source
code, no binary file (file.bin) is produced, and any
existing binary file is renamed file.bin.bak. The ".bak"
version is deleted upon successful compilation. This
prevents a corrupted binary from overwriting a previous
working version.
-nb Suppress binary file.
-bss Put uninitialized global variables in the .bss section of
the object file.
-nbss (D) Put uninitialized global variables in named sections.
-comchk Check for balanced comments and warn if not.
-ncomchk (D) Suppress comment checking.
-cond Compile lines prefixed with "#debug".
-ncond (D) Ignore lines prefixed with "#debug".
-cpu id Generate code for a particular class of processors.
Values for id are:
160,460,660 Generate code which uses the additional
instructions supported by DNx60 (except the
DN560) and DSP160 processors.
90, 330, 560, 570, 580, 3000
Generate code which uses the additional
instructions supported by the DSP90, DN330,
DN560, DN570, DN580, and DN3000 processors.
any (d) Generate code which uses only the basic
instructions supported by the M68000.
fpx Generate code for the Floating-Point
Accelerator (FPX) unit.
fpa1 Directs the compiler to produce optimized
code for the Floating-Point Accelerator
(FPA) board that is available with DN4000
workstations. Use of this switch can
produce substantially faster code. Do
not use this switch, however, if the
target machine does not have an FPA board.
peb Generate code for a Performance Enhancement
Board.
-db (D) Generate runtime debug tables without symbol table.
-dbs Generate full runtime debug tables with symbol table.
-dba Identical to -dbs except that no optimization is performed
(i.e., -opt 0 is set). This prevails even if you also
specify -opt.
-ndb Suppress runtime debug tables.
-def name[=value]
Define a name, with an optional value, for the
preprocessor. The default value is 1. Spaces may be used
in the definition only if the entire definition is
enclosed in quotes. Up to 128 -def options may be given.
-es Write the pre-processed expanded source to standard output
-esf [pathname]
Write the pre-processed expanded source to a file.
-exp Generate expanded code listing (implies -l).
-nexp (D) Suppress expanded code listing.
-frnd Forces the compiler to write all floating-point operands
to memory and then fetch the memory contents before
evaluating the expression. This ensures that each
operand will have the same amount of precision so that
floating-point comparisons will produce correct results.
If you do not compile with -frnd, floating-point operands
may be kept in registers, which support more accuracy than
memory. Consequently, when a register operand is compared
with a memory operand, the result may not be what is
expected. This is particularly true of equality
comparisons.
-idir pathname Add a pathname to the search hierarchy of directories for
include file names. The hierarchy applies only to file
name string which do NOT begin with begin with '.', '~',
or is:
"quoted_file" -----> | the working directory;
<bracketed_file> --> | -idir directories, if any;
V /usr/include/
-indexl Use 32 bit indexing for all array references.
-nindexl (D) Indexing based on dimension information.
-info level Control the output of informational messages. The four
informational levels are 0, 1, 2 and 3. -info 0 is the
default; it suppresses informational messages.
-inlib Specify one or more libraries that are not currently
installed but should be installed when the program is
executed. These libraries are sarched at compile-time to
determine whether indirect or absolute references should
be generated.
-l [file] Generate compilation listing. If no pathname is
specified, the listing is written to a file with the same
name as the source file, but with the suffix .lst
replacing .c.
-nl (D) Suppress compilation listing.
-map Generate symbol table map (implies -l).
-nmap (D) Suppress symbol table map.
-mgbl (D) Map globals names on output to maintain case sensitivity.
-nmgbl Do not map global names; output all names in upper case.
-msgs (D) Force compile to print final message summarizing listing
number of errors and warnings.
-nmsgs Suppresses final compilation message.
-opt [n] (D) Perform global optimization. 'n' is a single digit
integer in the range 0 to 4, indicating the level of
optimization performed. -opt 0 is identical to the
obsolete switch -nopt. If 'n' is omitted, 3 is the
default level. Increasing the optimization level results
in faster execution of your program, at the expense of
longer compilation time. See the Domain C Language
Reference manual for details.
-nopt Suppress global optimization. Obsolete switch. Use -opt 0.
-pic Produce position-independent object code. The default is
to produce absolute code.
-prof Produce code that, when executed, produces a ".mon" file
that can be used by the prof utility to evaluate
performance.
-runtype systype
Cause the compiler to use the runtime semantics of the
specified systype regardless of the current environment
setting.
-std Flag usage of non-standard features with warnings.
-nstd (D) No warnings for usage of non-standard features.
-systype type Set UNIX system type. Valid types are:
sys5
sys5.3
bsd4.2
bsd4.3
any
When specified, this option sets the systype and
compilesystype environment variables for the life of this
compilation.
-talign Cause the compiler to issue informational messages about
objects that are not naturally aligned. This option works
in conjunction with the -info option.
-type (D) Cause the compiler to recognize function prototypes and
reference variables. Also defines __stdc__ to be 1.
-ntype Turn off function prototypes and reference variables.
-uline (D) Recognize "#line" preprocessor options for source file
line numbering. The compiler will report errors in terms
of the line numbers set by this option. The debugger line
number table will be built with these line numbers.
-nuline Ignore "#line" preprocessor options.
-version Print the version number of the compiler. If you use this
option, do not include a source filename.
-warn (D) Display warning messages.
-nwarn Suppress warning messages.
EXAMPLES
If there were no errors in the source code and the compilation proceeded
normally, the C compiler outputs an object module file and an optional
listing file. Unless you specify otherwise (with the -b switch), the
object module file has the same name as the source file, except that
".bin" replaces ".c" as the suffix. Similarly, ".lst" replaces ".c" in
the listing file name. Thus, in response to the command:
$ cc plot_data -l
the C compiler reads the file plot_data.c, and produces an object
module file named plot_data.bin and a listing file named plot_data.lst.
If errors occur during compilation, the compiler writes diagnostic
messages to error output and flags the incorrect statements in the
listing file.