PCC(1) —
NAME
pcc − pcc-based C compiler
SYNOPSIS
pcc [ option ] ... file ...
DESCRIPTION
Pcc accepts several types of arguments:
Arguments with names ending in “.c” are taken to be C source programs; they are compiled, and each object program is left with a corresponding file name ending in “.o”. The “.o” file is normally deleted, however, if a single C program is compiled and loaded at one time.
In the same way, arguments with names ending in “.s” are taken to be assembly source programs and are assembled, producing a “.o” file.
The following options are interpreted by pcc. See ld(1) for load-time options.
−c Suppress the loading phase of the compilation, and force an object file to be produced even if only one program is compiled.
−g Have the compiler produce additional symbol-table information for dbx(1). Also pass the −lg flag to ld(1).
−w Suppress warning diagnostics.
−p Arrange for the compiler to produce code that counts the number of times each routine is called during execution. If loading takes place, search the profiling library /usr/lib/libc_p.a in lieu of the standard C library /lib/libc.a. Also replace the standard startup routine by one that automatically calls monitor(3) at the start and arranges to write out a mon.out file at normal termination of execution of the object program. An execution profile can then be generated by use of prof(1).
−pg Like −p, but invoke a run-time recording mechanism that keeps more extensive statistics and produces a gmon.out file at normal termination. An execution profile can then be generated by use of gprof(1).
−O Invoke an object-code improver. The following flags specify that only certain optimizations are to be performed:
−Ob Do balr optimizations.
−Oj Do jump optimizations.
−Ol Do load optimizations.
−On When used with the −S flag, compiler output containing optimizer directives is produced; otherwise it specifies that no optimizations are to be performed.
−Or Do register variable optimizations.
−Om Do move register optimizations.
−Ox Do miscellaneous optimizations.
The following flags may be specified for debugging the optimizer.
−Ot Turn on tracing.
−Od Turn on debugging.
−Os Show modifications resulting from optimization in the output file.
−R Pass this flag on to as, making initialized variables shared and read-only.
−S Compile the named C programs, and leave the assembler-language output on corresponding files suffixed “.s”.
−M Run only the macro preprocessor on the named C programs, requesting it to generate Makefile dependencies and send the result to the standard output.
−E Run only the macro preprocessor on the named C programs, and send the result to the standard output.
−C prevent the macro preprocessor from removing comments.
−o output
Name the final output file output. If this option is used, the file a.out will be left undisturbed.
−Dname=def
−Dname Define name to the preprocessor, as if by “#define”. If no definition is given, name is defined as 1 (one).
−Uname Remove any initial definition of name.
−Idir “#include” files that do not have names beginning in “/” are always sought first in the directory of the file argument, then in directories named in −I options, and finally in directories on a standard list.
−Ldir Library archives are sought first in directories named in −L options, then in directories on a standard list.
−Bstring Find substitute compiler passes in the files named string with the suffixes “cpp,” “ccom,” and “c2”. If string is empty, it defaults to /usr/c/o.
−t[p012]
Find only the designated compiler passes in the files whose names are constructed by a −B option. In the absence of a −B option, the string is taken to be /usr/c/.
−v Pcc debugging flag. Displays the programs being called and their arguments on standard error.
−mx Compile using some machine-dependent options. Currently available options are:
−ma Support use of alloca(3) by the compiled function. Alloca places some constraints on compiled code, making it slightly less efficient. Only the individual functions that call alloca need be compiled with −ma.
−ms Forces the compiler to put out minimum-size floating point data blocks. (Normally they are generously padded.) This guarantees that the size of objects will remain approximate to that of previous releases, at the expense of performance. See “IBM/4.3 Linkage Convention” in Volume II, Supplementary Documents, for more information.
Several compiler debugging flags are also available. A flag may be repeated, to obtain more voluminous output. Usually repetitions beyond the fifth have no effect.
−xl Include the source line numbers as comments in the assembler output.
−xd Ddebug flag for debugging the first pass of the compiler.
−xi Idebug flag for debugging the first pass of the compiler.
−xb Bdebug flag for debugging the first pass of the compiler.
−xt Tdebug flag for debugging the first pass of the compiler.
−xe Edebug flag for debugging the first pass of the compiler.
−xx Xdebug flag for debugging the first pass of the compiler.
−xp Expression flag for debugging the second pass of the compiler.
−xo Orders flag for debugging the second pass of the compiler.
−xr Register allocation flag for debugging the second pass of the compiler.
−xa Rallo flag for debugging the second pass of the compiler.
−xv Vdebug flag for debugging the second pass of the compiler.
−xc Ttype calls flag for debugging the second pass of the compiler.
−xs Shapes flag for debugging the second pass of the compiler.
−xu Sethi-Ullman flag for debugging the second pass of the compiler.
−xm General machine-dependent flag for debugging the second pass of the compiler.
The flags -f and -Hxxx are not supported (-Hxxx is supported by hc(1) only); specifying these flags will cause a warning message, though compilation will continue.
Other arguments are taken to be either loader option arguments or C-compatible object programs typically produced by an earlier pcc or hc run, or perhaps libraries of C-compatible routines. These programs, together with the results of any compilations specified, are loaded (in the order given) to produce an executable file named a.out.
FILES
file.cinput file
file.oobject file
a.outloaded output
/tmp/ctm?temporary
/lib/cpppreprocessor
/lib/ccomcompiler
/usr/c/occombackup compiler
/usr/c/ocppbackup preprocessor
/lib/c2optional optimizer
/lib/crt0.oruntime startoff
/lib/mcrt0.ostartoff for profiling
/usr/lib/gcrt0.ostartoff for gprof-profiling
/lib/libc.astandard library, see intro(3)
/usr/lib/libc_p.aprofiling library, see intro(3)
/usr/includedirectory for #include files
mon.outfile produced for analysis by prof(1)
gmon.outfile produced for analysis by gprof(1)
SEE ALSO
B. W. Kernighan and D. M. Ritchie, The C Programming Language, Prentice-Hall, 1978
B. W. Kernighan, Programming in C—a tutorial
D. M. Ritchie, C Reference Manual
“IBM/4.3 Linkage Conventions” in Volume II, Supplementary Documents
adb(1), as(1), cc(1), dbx(1), gprof(1), hc(1), ld(1), prof(1), malloc(3), monitor(3)
DIAGNOSTICS
The diagnostics produced by pcc are intended to be self-explanatory. Occasional messages may be produced by the assembler or loader.
BUGS
The load, register-variable and balr optimizations contain bugs.
Currently, only jump and move-register optimizations are enabled.
Certain simple expressions, particularly constant expressions used as initializers, may be reported to be too complex. Rewrite the expression, or decompose it into two expressions.
The value resulting from an assignment to a char or short is not truncated to the width of the lvalue. This affects only assignment subexpressions contained within larger expressions. Thus:
int3 = char2 = -1
sets char2 to 255 and int3 to -1.
Multiple assignment of structs or unions causes a compiler error. Rewrite:
struct3 = struct2 = struct1
as two assignment statements.
Frame size (space occupied by auto variables) is limited to 32K.
Hc(1) has none of these restrictions; consider using it as an alternative to pcc.
PRPQs 5799-WZQ/5799-PFF: IBM/4.3 — July 1987