PC(1) COMMAND REFERENCE PC(1) NAME pc - Pascal compiler Pascal is optional. SYNOPSIS pc [ option ] [ -i filename... ] filename... DESCRIPTION Pc is a Pascal compiler. If given an argument file ending with .p, it compiles the file and loads it into an executable file called, by default, a.out. A program may be separated into more than one .p file. Pc compiles a number of argument .p files into object files (with the extension .o in place of .p). Object files may then be loaded into an executable a.out file. Exactly one object file must supply a program statement to successfully create an executable a.out file. The rest of the files must consist only of declarations that logically nest within the program. References to objects shared between separately compiled files are allowed if the objects are declared in included header files, whose names must end with .h. Header files may only be included at the outermost level, and thus declare only globally available objects. To allow functions and procedures to be declared, an external directive has been added, whose use is similar to the forward directive but restricted to appear only in .h files. Function and procedure bodies may not appear in .h files. A binding phase of the compiler checks that declarations are used consistently, to enforce the type-checking rules of Pascal. Object files created by other language processors may be loaded together with object files created by pc. The functions and procedures they define must have been declared in .h files included by all the .p files that call those routines. Calling conventions are as in C, with var parameters passed by address. See the Pascal User Manual and Report or Pascal Compiler for the 68000/10/20 reference document for details. OPTIONS The following options have the same meaning as in cc(1) and f77(1). See ld(1) for load-time options. Only load-time options may follow non-option arguments to pc. -c Suppress loading and produce .o file(s) from source file(s). -f1167 Generate code for Weitek 1167 floating point accelerator. Printed 5/12/88 1
PC(1) COMMAND REFERENCE PC(1) -g Have the compiler produce additional symbol table information for dbx(1). Also pass the -lg flag to the loader. -go Have the compiler produce additional symbol table information for sdb(1). Also pass the -lg flag to the loader. -o output Name the final output file output instead of a.out. -p Prepare object files for profiling, see prof(1). -pg Prepare object files for profiling, see gprof(1). -w Suppress warning messages. -O Invoke an object-code improver. This makes the program both smaller and faster. -O1 Invoke an object-code improver. This optimization differs from the `-O' option in that it will increase program size to make the program faster. This option should only be used on modules that contain code that is frequently executed (i.e. in a loop construct). This is not the same as "cc -O" on other UNIX systems. -O2 Invoke an object-code improver. Tells the optimizer to assume that no memory locations can be changed asynchronously by external hardware in the case of I/O device registers, by other processes in the case of shared memory, or by signal handler routines. This option implies `-O1'. This is not the same as "cc -O" on other UNIX systems. -O3 Invoke an object-code improver. This option differs from `-O2' in that it doesn't imply `-O1'. -S Compile the named program, and leave the assembler- language output on the corresponding file suffixed .s. (No .o is created.) -d Print debugging information. Gives RCS id information on all pieces of the compiler. The information given by this option should be included with any bug reports on the Pascal compiler. Printed 5/12/88 2
PC(1) COMMAND REFERENCE PC(1) -v Print the version number of the compiler, and the name of each pass as it executes. -Xnnn Where nnn is an unsigned integer constant. Turn on compile time option number nnn. The available compile time options are listed in the Pascal Compiler for the 68000/10/20 reference document. -Znnn Where nnn is an unsigned integer constant. Turn off compile time option number nnn. The available compile time options are listed in the Pascal Compiler for the 68000/10/20 reference document. This option is useful to turn off some default flag that is supplied to the compiler. The following options are peculiar to pc. -s Accept standard Pascal only; nonstandard constructs cause warning diagnostics. -C Compile code to perform run-time checks, verify assert statements, and initialize all variables to zero. -P Apply the C preprocessor to relevant files, put the result in the file with the suffix changed to .p, but do not compile. -Dname=def -Dname Define the name to the C preprocessor, as if by #define. If no definition is given, the name is defined as 1. (This option can be used with .P suffix files only.) -Idir #include files whose names do not begin with a slash ( / ) are always sought first in the directory of the file argument, then in directories named in -I options, then in directories on a standard list. (This option can be used with .P suffix files only.) -m[4] Apply the M4 preprocessor to each .p file. Other arguments are loader option arguments, perhaps libraries of pc compatible routines. Certain flags can also be controlled in comments within the program, as described in the Berkeley Pascal User's Manual. Printed 5/12/88 3
PC(1) COMMAND REFERENCE PC(1) EXAMPLES The following example compiles program.p and puts the object code in program: pc program.p -o program FILES file.p Pascal source files /lib/pcom68 compiler /usr/lib/libpc.a intrinsic functions and I/O library /usr/lib/libm.a math library /lib/libc.a standard library, see intro(3) CAVEATS Because the -s option is usurped by the compiler, it is not possible to pass the strip option to the loader. Thus programs that are to be stripped must be run through strip(1) after they are compiled. SEE ALSO prof(1), sdb(1), dbx(1), Pascal User Manual and Report and Pascal Compiler for the 68000/10/20 reference document. Printed 5/12/88 4
%%index%% na:192,98; sy:290,213; de:503,2288; op:2791,547;3602,3220;7086,2678; ex:10028,243; fi:10271,405; ca:10676,333; se:11009,362; %%index%%000000000158