DataMuseum.dk

Presents historical artifacts from the history of:

ICL Comet 32

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about ICL Comet 32

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - metrics - download

⟦1640b0ee1⟧ TextFile

    Length: 8114 (0x1fb2)
    Types: TextFile
    Notes: UNIX file
    Names: »cc.1«

Derivation

└─⟦26887b7e0⟧ Bits:30009717 Comet 32 harddisk image
    └─⟦28c352965⟧ »/a« UNIX Filesystem
        └─⟦this⟧ »usr/man/man1/cc.1« 

TextFile

.ig
	@(#)cc.1	2.1	7/1/84
	@(#)Copyright (C) 1983 by National Semiconductor Corp.
..
.if t .ds P #\ 
.if n .ds P #
.TH CC 1
.SH NAME
cc \- C compiler (nmcc for cross-support)
.SH SYNOPSIS
.B cc
[ option ] ...
.I file ...
.sp
.B nmcc
[ option ] ...
.I file ...
.SH DESCRIPTION
.I Cc
is the G\s-2ENIX\s0 C compiler.
It accepts several types of arguments:
.PP
Arguments whose names end with `.c' are taken to be
C source programs; they are compiled, and
object programs are left in files
whose names are those of the source with `.o' substituted
for `.c'.
The `.o' file is normally deleted, however, if a single
C program is compiled and loaded all at the same time.
.PP
In the same way,
arguments whose names end with `.s' are taken to be assembly source programs
and are assembled, producing `.o' files.
.PP
The compiler accepts several implicit options.  These can
be set through the environment variables,
.I INCLUDEPATH
and
.I CRTPATH .
These implicit
options are default pathnames for searching for include files and
a default pathname for finding crt0.o (the startup routine).
.PP
The standard search path for
.I include
files
is /usr/include or /usr/NSC/include for cross-support.
The standard path can be overridden by setting the environment variable
.I INCLUDEPATH
to a list of directories.  The list must be seperated by '
.B \:
's
in the same form as the 
.I PATH
environment variable.
.PP
The standard location for crt0.o is /lib or /usr/NSC/lib for cross-support.
The value of the environment variable 
.I CRTPATH
will override that
location.  This can be useful when doing work which requires cross
compilation.
.PP
The following options are interpreted by
.IR cc .
See
.IR ld (1)
for load-time options.
.TP 8
.B \-c
Suppress the loading phase of the compilation, and force
an object file to be produced even if only one program is compiled.
.TP
.B \-w
Suppress warning diagnostics.
.TP
.B \-p
Arrange for the compiler to produce code
which counts the number of times each routine is called;
also, if loading takes place, replace the standard startup
routine by one which automatically calls
.IR monitor (3)
at the start and arranges to write out a
.I mon.out
file at normal termination of execution of the object program.
An execution profile can then be generated by
use of
.IR  prof (1).
.TP
.SM
.B \-O
Invoke an
object code improver.
Do not use on programs that contain
.B asm
statements as the result may not be correct.
.TP
.SM
.B \-i
Suppress optimizations that are incorrect when memory locations,
such as memory mapped device registers,
might spontaneously change value.  
The 
.B \-i
option is ignored when
.B \-O
is not present.
.TP
.SM
.B \-S
Compile the named C programs, and leave the
assembler-language output on corresponding files suffixed `.s'.
.TP
.SM
.B \-E
Run only the macro preprocessor
on the named C programs, and send the result to the
standard output.
.TP
.SM
.B \-C
Prevent the macro preprocessor from removing comments.
.TP
.BI \-o " output"
Name the final output file
.IR output .
When this option is used, 
.I cc
leaves any existing file named 
.I a.out 
undisturbed.
.TP
.SM
.B \-v
List the utilities
.I cc
calls and their arguments on standard output.
Information produced by the 
.B \-v
verbose flag is useful for debugging.
.TP
.SM
.B \-vn
List the utilities
.I cc
would call and their arguments.  
.I Cc
does not actually call the utilities.
The only result is the list -- 
.I file
is not compiled.  
.TP
.SM
.BI \-D \*Sname = def
.br
.ns
.TP
.SM
.BI \-D \*Sname
Define the
.I name
to the preprocessor,
as if by
`\*Pdefine'.
If no definition is given, the name is defined as `1'.
.TP
.SM
.BI \-U \*Sname
Remove any initial definition of \f2name\fP.
(The C
preprocessor supplies initial definitions of `1' for the symbols
``ns16000'' and ``unix''.)
.TP
.SM
.BI \-I \*Sdir
`#include' files
whose names do not begin with `/' are always
sought first in the directory 
of the
.I file
argument,
then in directories named in 
.B \-I
options,
finally in directories on a standard list.
However '#include' files that are included using '<' '>' as delimiters
instead of quotation marks are not searched for in the directory of the 
.I file
argument.

.TP
.SM
.BI \-B \*Sstring
Find substitute compiler passes in the file or path named
.IR string .
.B \-B
appends cpp (for preprocessor), ccom (for the compiler proper), 
or c2 (for the optimizer) to 
.I string.
If 
.I string
is not specified, the default is /usr/c/o.
.TP
.BR \-t [ p02 ]
Find only the designated compiler passes in the
file or path whose names are constructed by a
.B \-B
option.
.B p
specifies the preprocessor,
.B 0
specifies the compiler, and
.B 2
specifies the optimizer.
In the absence of a
.B \-B 
option, the
.I string
is taken to be /usr/c/n.
.TP
.SM
.BI \-g
Print line numbers as comments in the
assembly language source when the -S flag is also given.
.TP
.B \-F
Gives fast access to global variables.
It locates all non-extern declarations of
variables in the local static base area; there is no
common area.
This results in a considerable increase in speed as all 
variable accesses
in the module that declared the variable are SB relative, not 
external.
Note that only one non-extern declaration of each variable in
the whole program is possible.
This option increases the object file size and the start-up time
for a program, so is most useful for programs that execute for a 
long time and do not declare large uninitialized arrays.
.TP
.SM
.B \-q
Pass this switch to the assembler, which puts
the link table relative to the SB register.
This speeds up execution
time of external calls and access time of external variables.
See 
.IR as(1) .
.PP
.I Cc
assumes that other arguments are 
loader option arguments, C-compatible
object programs, typically produced by an earlier
.I cc
run,
or libraries of C-compatible routines.
These programs
are loaded (in the order
given) to produce an executable program with the name
.I a.out.
.SH FILES
.nr aa \w'/usr/bin/lib/occom'
.ta \n(aau+(3n)
.br
file.c	input file
.br
file.o	object file 
.br
file.s	assembly file 
.br
a.out	loaded output 
.br
/tmp/ctm? /tmp	temporary
.br
/lib/cpp	preprocessor
.br
/lib/ccom	compiler
.br
/usr/c/occom	backup compiler
.br
/lib/c2		optional optimizer
.br
/lib/crt0.o	run-time startoff
.br
/lib/mcrt0.o	startoff for profiling
.br
/lib/libc.a	standard library, see (3)
.br
/usr/include	standard directory for `#include' files
.fi
.SH "SEE ALSO"
B. W. Kernighan and D. M. Ritchie,
.I The C Programming Language,
Prentice-Hall, 1978
.br
B. W. Kernighan,
.I Programming in C\(ema tutorial
.br
D. M. Ritchie,
.I
C Reference Manual
.br
as(1), monitor(3), prof(1), ddt(1), ld(1)
.SH DIAGNOSTICS
The diagnostics produced by C itself are intended to be
self-explanatory.
Occasional messages may be produced by the assembler
or loader.
.SH CROSS-SUPPORT
In a cross-support environment 
.I cc 
is called 
.I nmcc.
The default substitute compiler passes are in
/usr/NSC/lib/o for
.B \-B
and in /usr/NSC/lib/n
for 
.BR \-t .
.SH BUGS
The compiler currently ignores instructions 
to put \f3char\fP, \f3unsigned char\fP,
\f3short\fP or \f3unsigned short\fP variables in registers.  It previously
produced poor, and in some cases incorrect, code for such declarations.
.sp
The \f2Series 32000\f1 does not support signed bitfields;
therefore, all bitfields are unsigned.
However if a bitfield is declared as int or long instead of unsigned,
the compiler will generate int operations and comparisons on it rather 
than unsigned.
The bitfield will always be a positive number.
.sp
Nested assignment statements do not always preserve the types of the
variables being assigned.  For example:
.PP
.RS 10
int a,c;
.br
short b;
.br
a=b =c;
.RE
will not always result in \fIa\fP only getting the low order 16 bits of \fIc\fP.
It
will often get the whole 32-bits.  To be safe use:
.PP
.RS 10
b=c;
.br
a=b;
.RE
in this situation.
.sp
Post-incrementing or post-decrementing a bit field
(for example, ``d*a.b++'') in an
expression does not work.
.PP
.I Cc
only allows identifiers up to 31 significant characters because 
of an assembler restriction.