|
|
1.1 root 1: .\" Copyright (c) 1980 Regents of the University of California.
2: .\" All rights reserved. The Berkeley software License Agreement
3: .\" specifies the terms and conditions for redistribution.
4: .\"
5: .\" @(#)pc.1 6.1 (Berkeley) 4/29/85
6: .\"
7: .TH PC 1 "April 29, 1985"
8: .UC 4
9: .SH NAME
10: pc \- Pascal compiler
11: .SH SYNOPSIS
12: .B pc
13: [ option ] [
14: .B \-i
15: name ...
16: ] name ...
17: .SH DESCRIPTION
18: .I Pc
19: is a Pascal compiler.
20: If given an argument file ending with
21: .BR .p ,
22: it will compile the file
23: and load it
24: into an executable file called, by default,
25: .IR a.out .
26: .PP
27: A program may be separated into more than one
28: .B .p
29: file.
30: .I Pc
31: will compile a number of argument
32: .B .p
33: files into object files (with
34: the extension
35: .B .o
36: in place of
37: .BR .p ).
38: Object files may then be loaded
39: into an executable
40: .I a.out
41: file.
42: Exactly one object file must supply a
43: .B program
44: statement to successfully create an executable a.out file.
45: The rest of the files must consist only of
46: declarations which logically nest within the program.
47: References to objects shared between separately compiled files
48: are allowed if the objects are declared in
49: .BR include d
50: header files, whose names must end with
51: .BR .h .
52: Header files may only be included at the outermost level,
53: and thus declare only globally available objects.
54: To allow
55: .BR function s
56: and
57: .BR procedure s
58: to be declared, an
59: .B external
60: directive has been added, whose use is similar to the
61: .B forward
62: directive but restricted to appear only in
63: .B .h
64: files.
65: .B Function
66: and
67: .B procedure
68: bodies may not appear in
69: .B .h
70: files.
71: A binding phase of the compiler checks that declarations
72: are used consistently, to enforce the type checking rules of Pascal.
73: .PP
74: Object files
75: created by other language processors may be loaded together with
76: object files created by
77: .IR pc .
78: The
79: .BR function s
80: and
81: .BR procedure s
82: they define must have been declared
83: in
84: .B .h
85: files included by all the
86: .B .p
87: files which call those
88: routines.
89: Calling conventions are as in C,
90: with
91: .B var
92: parameters passed by address.
93: .PP
94: See the Berkeley Pascal User's Manual for details.
95: .PP
96: The following options have the same meaning as in
97: .IR cc (1)
98: and
99: .IR f77 (1).
100: See
101: .IR ld (1)
102: for load-time options.
103: .TP 6
104: .B \-c
105: Suppress loading and produce `.o' file(s) from source file(s).
106: .TP 6
107: .B \-g
108: Have the compiler produce additional symbol table information for
109: .IR dbx (1).
110: .TP 6
111: .BR \-w
112: Suppress warning messages.
113: .TP 6
114: .B \-p
115: Prepare object files for profiling, see
116: .IR prof (1).
117: .TP 6
118: .SM
119: .B \-O
120: Invoke an
121: object-code improver.
122: .TP 6
123: .SM
124: .B \-S
125: Compile the named program, and leave the
126: assembler-language output on the corresponding file suffixed `.s'.
127: (No `.o' is created.).
128: .TP 6
129: .BR \-o " output"
130: Name the final output file
131: .I output
132: instead of
133: .I a.out.
134: .PP
135: The following options are peculiar to
136: .IR pc .
137: .TP 6
138: .B \-C
139: Compile code to perform runtime checks,
140: verify
141: .B assert
142: calls,
143: and initialize all variables to zero as in
144: .IR pi .
145: .TP 6
146: .B \-b
147: Block buffer the file
148: .I output.
149: .TP 6
150: .B \-i
151: Produce a listing for
152: the specified procedures, functions and
153: .B include
154: files.
155: .TP 6
156: .B \-l
157: Make a program listing during translation.
158: .TP 6
159: .B \-s
160: Accept standard Pascal only;
161: non-standard constructs cause warning diagnostics.
162: .TP 6
163: .BR \-t " directory"
164: Use the given
165: .I directory
166: for compiler temporary files.
167: .TP 6
168: .B \-z
169: Allow execution profiling with
170: .I pxp
171: by generating statement counters, and arranging for the
172: creation of the profile data file
173: .I pmon.out
174: when the resulting object is executed.
175: .PP
176: Other arguments
177: are taken
178: to be loader option arguments,
179: perhaps libraries of
180: .IR pc
181: compatible routines.
182: Certain flags can also be controlled in comments within the program
183: as described in the
184: .I "Berkeley Pascal User's Manual."
185: .SH FILES
186: .ta 2.5i
187: file.p pascal source files
188: .br
189: /usr/lib/pc0 compiler
190: .br
191: /lib/f1 code generator
192: .br
193: /usr/lib/pc2 runtime integrator (inline expander)
194: .br
195: /lib/c2 peephole optimizer
196: .br
197: /usr/lib/pc3 separate compilation consistency checker
198: .br
199: /usr/lib/pc2.*strings text of the error messages
200: .br
201: /usr/lib/how_pc basic usage explanation
202: .br
203: /usr/lib/libpc.a intrinsic functions and I/O library
204: .br
205: /usr/lib/libm.a math library
206: .br
207: /lib/libc.a standard library, see \fIintro\fP(3)
208: .SH "SEE ALSO"
209: Berkeley Pascal User's Manual
210: .br
211: pi(1),
212: pxp(1),
213: pxref(1),
214: sdb(1)
215: .SH DIAGNOSTICS
216: For a basic explanation do
217: .IP
218: .B pc
219: .PP
220: See
221: .IR pi (1).
222: for an explanation of the error message format.
223: Internal errors cause messages containing the word SNARK.
224: .SH AUTHORS
225: Charles B. Haley, William N. Joy, and Ken Thompson
226: .br
227: Retargetted to the second pass of the portable
228: .IR C
229: compiler by Peter Kessler
230: .br
231: Runtime library and inline optimizer by M. Kirk McKusick
232: .br
233: Separate compilation consistency checking by Louise Madrid
234: .SH BUGS
235: The keyword
236: .B packed
237: is recognized but has no effect.
238: .PP
239: The binder is not as strict as described here,
240: with regard to the rules about external declarations only
241: in `.h' files and including `.h' files only at the outermost level.
242: It will be made to perform these checks in its next incarnation,
243: so users are warned not to be sloppy.
244: .PP
245: The
246: .B \-z
247: flag doesn't work for separately compiled files.
248: .PP
249: Because the
250: .B \-s
251: option is usurped by the compiler,
252: it is not possible to pass the strip option to the loader.
253: Thus programs which are to be stripped, must be run through
254: .IR strip (1)
255: after they are compiled.
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.