CC Aegis CC
NAME
cc - compile a C program
SYNOPSIS
cc source_file [-ac] [-alnchk | -nalnchk] [-nansi]
[-b [file] |-nb] [-bss|-nbss]
[-bx [file]] [-comchk|-ncomchk]
[-compress | -ncompress ]
[-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] [-lfile|-nl]
[-map|-nmap] [-mgbl|-nmgbl]
[-msgs|-nmsgs] [-natural | -nnatural]
[-nclines] [-opt [n]] [-pic]
[-prasm | -nprasm]
[-prof] [-runtype systype] [-std|-nstd]
[-nstdc] [-systype systype]
[-type|-ntype] [-uline|-nuline]
[-version] [-warn|-nwarn] [-xansi]
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.
You can typically improve run-time performance if you compile
your code using the -cpu option with a processor-specific id.
Use an argument appropriate to the CPU type of the machine(s)
on which you will run the executable file. The option -cpu 3000,
for example, generates optimal code for the DSP90, DN330, DN560,
DN570, DN580, DN3000, DN3500, DN4000, and DN4500 processors.
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)".
-ac Produce absolute code (680x0-based
workstations only). The alternative option is
-pic, which forces the compiler to produce
position-independent code. The default on
680x0-based workstations is -ac. Code
generated for Series 10000 workstations is
always -pic.
-alnchk Display messages about alignment of
structures. The default on 680x0-based
workstations is the -nalnchk option; the
default on Series 10000 workstations is
-alnchk.
-nalnchk Suppress alignment messages.
-nansi (No ANSI) Do not use any ANSI features.
-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. Use the -bx option to
suppress the appending of ".bin". 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.
-bx [file] (D) Same as -b, except suppresses appending
".bin" to the pathname. For instance, '-bx
test' tells the compiler to name the object
file 'test'.
-comchk Check for balanced comments and warn if
comments are not balanced.
-ncomchk (D) Suppress comment checking.
-compress Store the ".data" section object file data in
compressed form.
-ncompress (D) Store ".data" section object file data in
uncompressed form.
-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:
any Series 10000 code, if you're
compiling on a Series 10000
workstation, or 680x0 code, if
you're compiling on a
680x0-based workstation
a88k Series 10000 code
m68k 680x0-based code
160 DSP160 code
460 DSP460 code
660 660 code
90 DSP90 code
330 DN330 code
560 DN560 code
570 DN570 code
580 DN580 code
3000 DN3000, DN3500, DN4000, and DN4500
code
FPA1 FPA Floating-Point Accelerator Board
FPX Floating-Point Accelerator Board
PEB Performance Enhancement Board
The following values for id are synonyms: 160, 460, and 660.
Also, the following values for id are synonyms: 90, 330,
560, 570, 580, and 3000. Using a processor-specific code
generation mode can result in programs that run faster.
-db (D) Generate run-time debug tables without symbol
table.
-dbs Generate full run-time debug tables with
symbol table.
-dba Identical to -dbs except that no optimization
is performed (-opt 0 is set) 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 preprocessed expanded source to
standard output.
-esf [pathname]
Write the preprocessed expanded source to a
file. If you specify a pathname, the compiler
uses that name and automatically appends the
.i suffix, unless it is already present.
-exp Generate expanded code listing (implies -l).
-nexp (D) Suppress expanded code listing.
-frnd Force 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.
-indexl Use 32-bit indexing for all array references.
-nindexl (D) Use source code's array dimension information
to determine whether to use 16-bit or 32-bit
indexing.
-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 [pathname]
Specify one or more libraries that are
not currently installed but should be
installed when the program is executed.
These libraries are searched 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 global names on output to maintain case
sensitivity.
-nmgbl Do not map global names; output all names in
uppercase.
-msgs (D) Force compile to print final message
summarizing listing number of errors and
warnings.
-nmsgs Suppresses final compilation message.
-natural Use natural alignment for structures and
array elements that do not have alignment
attributes.
-nnatural (D) Suppress natural alignment for structures and
array elements that do not have alignment
attributes.
-nclines Suppress the generation of COFF line number
tables.
-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.
-pic Produce position-independent object code.
The default on 680x0-based workstations is
the -ac option; the default on Series 10000
workstations is -pic.
-prasm (D) Use Series 10000 assembly language format for
the expanded listing generated by -exp. Note:
this option has no effect if used without the
-exp option or if used on a 680x0-based
workstation.
-nprasm Use an assembly language format similar to
the 680x0-based assembly language for the
expanded listing generated by -exp. Note:
this option has no effect if used without the
-exp option or if used on a 680x0-based
workstation.
-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 nonstandard features with
warnings. Note: This option refers to the K&R
1983 'standard', not the ANSI standard.
-nstd (D) Do not generate warnings for usage of
nonstandard features.
-nstdc Set the value of __STDC__ to 0. Use this
option along with -xansi if portions of your
code use ANSI features not yet implemented by
Domain C and the unimplemented ANSI features
are contingent on __STDC__ being defined.
-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 duration of this
compilation.
-type (D) Obsolete option. Use -xansi.
-ntype Obsolete option. Use -nansi.
-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.
-xansi (Extended ANSI) Use all ANSI features
currently available; also use all Domain
extensions. The ANSI features currently
implemented include: function prototyping,
const,volatile, and signed qualifiers,
__STDC__ macro definition
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.