Commit | Line | Data |
---|---|---|
d386b0d7 C |
1 | PC(1) UNIX Reference Manual PC(1) |
2 | ||
3 | N\bNA\bAM\bME\bE | |
4 | p\bpc\bc - Pascal compiler | |
5 | ||
6 | S\bSY\bYN\bNO\bOP\bPS\bSI\bIS\bS | |
7 | p\bpc\bc [option] [-\b-i\bi _\bn_\ba_\bm_\be ...] _\bn_\ba_\bm_\be ... | |
8 | ||
9 | D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN | |
10 | P\bPc\bc is a Pascal compiler. If given an argument file ending with ._\bp, it | |
11 | will compile the file and load it into an executable file called, by de- | |
12 | fault, _\ba._\bo_\bu_\bt. | |
13 | ||
14 | A program may be separated into more than one ._\bp file. P\bPc\bc will compile a | |
15 | number of argument ._\bp files into object files (with the extension ._\bo in | |
16 | place of ._\bp). Object files may then be loaded into an executable _\ba._\bo_\bu_\bt | |
17 | file. Exactly one object file must supply a _\bp_\br_\bo_\bg_\br_\ba_\bm statement to suc- | |
18 | cessfully create an executable a.out file. The rest of the files must | |
19 | consist only of declarations which logically nest within the program. | |
20 | References to objects shared between separately compiled files are al- | |
21 | lowed if the objects are declared in i\bin\bnc\bcl\blu\bud\bde\bed\bd header files, whose names | |
22 | must end with ._\bh. Header files may only be included at the outermost | |
23 | level, and thus declare only globally available objects. To allow | |
24 | f\bfu\bun\bnc\bct\bti\bio\bon\bns and p\bpr\bro\boc\bce\bed\bdu\bur\bre\bes to be declared, an e\bex\bxt\bte\ber\brn\bna\bal\bl directive has been | |
25 | added, whose use is similar to the f\bfo\bor\brw\bwa\bar\brd\bd directive but restricted to | |
26 | appear only in ._\bh files. F\bFu\bun\bnc\bct\bti\bio\bon\bn and p\bpr\bro\boc\bce\bed\bdu\bur\bre\be bodies may not appear in | |
27 | ._\bh files. A binding phase of the compiler checks that declarations are | |
28 | used consistently, to enforce the type checking rules of Pascal. | |
29 | ||
30 | Object files created by other language processors may be loaded together | |
31 | with object files created by p\bpc\bc. The f\bfu\bun\bnc\bct\bti\bio\bon\bns and p\bpr\bro\boc\bce\bed\bdu\bur\bre\bes they | |
32 | define must have been declared in ._\bh files included by all the ._\bp files | |
33 | which call those routines. Calling conventions are as in C, with v\bva\bar\br | |
34 | parameters passed by address. | |
35 | ||
36 | See the Berkeley Pascal User's Manual for details. | |
37 | ||
38 | The following options have the same meaning as in cc(1) and f77(1). See | |
39 | ld(1) for load-time options. | |
40 | ||
41 | -\b-c\bc Suppress loading and produce `.o' file(s) from source file(s). | |
42 | ||
43 | -\b-g\bg Have the compiler produce additional symbol table information | |
44 | for dbx(1). | |
45 | ||
46 | -\b-w\bw Suppress warning messages. | |
47 | ||
48 | -\b-p\bp Prepare object files for profiling, see prof(1). | |
49 | ||
50 | -\b-O\bO Invoke an object-code improver. | |
51 | ||
52 | -\b-S\bS Compile the named program, and leave the assembler-language | |
53 | output on the corresponding file suffixed `.s'. (No `.o' is | |
54 | created.). | |
55 | ||
56 | -\b-o\bo _\bo_\bu_\bt_\bp_\bu_\bt | |
57 | Name the final output file _\bo_\bu_\bt_\bp_\bu_\bt instead of _\ba._\bo_\bu_\bt. | |
58 | ||
59 | The following options are peculiar to p\bpc\bc. | |
60 | ||
61 | -\b-C\bC Compile code to perform runtime checks, verify a\bas\bss\bse\ber\brt\bt calls, | |
62 | and initialize all variables to zero as in p\bpi\bi. | |
63 | ||
64 | -\b-b\bb Block buffer the file _\bo_\bu_\bt_\bp_\bu_\bt. | |
65 | ||
66 | -\b-i\bi Produce a listing for the specified procedures, functions and | |
67 | _\bi_\bn_\bc_\bl_\bu_\bd_\be files. | |
68 | -\b-l\bl Make a program listing during translation. | |
69 | ||
70 | -\b-s\bs Accept standard Pascal only; non-standard constructs cause | |
71 | warning diagnostics. | |
72 | ||
73 | -\b-t\bt _\bd_\bi_\br_\be_\bc_\bt_\bo_\br_\by | |
74 | Use the given _\bd_\bi_\br_\be_\bc_\bt_\bo_\br_\by for compiler temporary files. | |
75 | ||
76 | -\b-z\bz Allow execution profiling with p\bpx\bxp\bp by generating statement | |
77 | counters, and arranging for the creation of the profile data | |
78 | file _\bp_\bm_\bo_\bn._\bo_\bu_\bt when the resulting object is executed. | |
79 | ||
80 | Other arguments are taken to be loader option arguments, perhaps li- | |
81 | braries of p\bpc\bc compatible routines. Certain flags can also be controlled | |
82 | in comments within the program as described in the _\bB_\be_\br_\bk_\be_\bl_\be_\by _\bP_\ba_\bs_\bc_\ba_\bl _\bU_\bs_\be_\br'_\bs | |
83 | _\bM_\ba_\bn_\bu_\ba_\bl. | |
84 | ||
85 | F\bFI\bIL\bLE\bES\bS | |
86 | _\bf_\bi_\bl_\be._\bp pascal source files | |
87 | /_\bu_\bs_\br/_\bl_\bi_\bb/_\bp_\bc_\b0 compiler | |
88 | /_\bl_\bi_\bb/_\bf_\b1 code generator | |
89 | /_\bu_\bs_\br/_\bl_\bi_\bb/_\bp_\bc_\b2 runtime integrator (inline expander) | |
90 | /_\bl_\bi_\bb/_\bc_\b2 peephole optimizer | |
91 | /_\bu_\bs_\br/_\bl_\bi_\bb/_\bp_\bc_\b3 separate compilation consistency checker | |
92 | /_\bu_\bs_\br/_\bl_\bi_\bb/_\bp_\bc_\b2.*_\bs_\bt_\br_\bi_\bn_\bg_\bs text of the error messages | |
93 | /_\bu_\bs_\br/_\bl_\bi_\bb/_\bh_\bo_\bw__\bp_\bc basic usage explanation | |
94 | /_\bu_\bs_\br/_\bl_\bi_\bb/_\bl_\bi_\bb_\bp_\bc._\ba intrinsic functions and I/O library | |
95 | /_\bu_\bs_\br/_\bl_\bi_\bb/_\bl_\bi_\bb_\bm._\ba math library | |
96 | /_\bl_\bi_\bb/_\bl_\bi_\bb_\bc._\ba standard library, see intro(3) | |
97 | ||
98 | ||
99 | S\bSE\bEE\bE A\bAL\bLS\bSO\bO | |
100 | _\bB_\be_\br_\bk_\be_\bl_\be_\by _\bP_\ba_\bs_\bc_\ba_\bl _\bU_\bs_\be_\br'_\bs _\bM_\ba_\bn_\bu_\ba_\bl | |
101 | pi(1), pxp(1), pxref(1), | |
102 | ||
103 | H\bHI\bIS\bST\bTO\bOR\bRY\bY | |
104 | P\bPc\bc appeared in 4.0 BSD. | |
105 | ||
106 | D\bDI\bIA\bAG\bGN\bNO\bOS\bST\bTI\bIC\bCS\bS | |
107 | For a basic explanation do | |
108 | ||
109 | p\bpc\bc | |
110 | ||
111 | See pi(1). for an explanation of the error message format. Internal er- | |
112 | rors cause messages containing the word SNARK. | |
113 | ||
114 | A\bAU\bUT\bTH\bHO\bOR\bRS\bS | |
115 | Charles B. Haley, William N. Joy, and Ken Thompson | |
116 | Retargetted to the second pass of the portable _\bC compiler by Peter | |
117 | Kessler | |
118 | Runtime library and inline optimizer by M. Kirk McKusick | |
119 | Separate compilation consistency checking by Louise Madrid | |
120 | ||
121 | B\bBU\bUG\bGS\bS | |
122 | The keyword p\bpa\bac\bck\bke\bed\bd is recognized but has no effect. | |
123 | ||
124 | The binder is not as strict as described here, with regard to the rules | |
125 | about external declarations only in `.h' files and including `.h' files | |
126 | only at the outermost level. It will be made to perform these checks in | |
127 | its next incarnation, so users are warned not to be sloppy. | |
128 | ||
129 | The -\b-z\bz flag doesn't work for separately compiled files. | |
130 | ||
131 | Because the -\b-s\bs option is usurped by the compiler, it is not possible to | |
132 | pass the strip option to the loader. Thus programs which are to be | |
133 | stripped, must be run through strip(1) after they are compiled. | |
134 | ||
135 | ||
136 | ||
137 | ||
138 | ||
139 | ||
140 | ||
141 | ||
142 | ||
143 | ||
144 | ||
145 | ||
146 | ||
147 | ||
148 | ||
149 | ||
150 | ||
151 | ||
152 | ||
153 | ||
154 | ||
155 | ||
156 | ||
157 | ||
158 | ||
159 | ||
160 | ||
161 | ||
162 | ||
163 | ||
164 | ||
165 | ||
166 | ||
167 | ||
168 | ||
169 | ||
170 | ||
171 | ||
172 | ||
173 | ||
174 | ||
175 | ||
176 | ||
177 | ||
178 | ||
179 | ||
180 | ||
181 | ||
182 | ||
183 | ||
184 | ||
185 | ||
186 | ||
187 | ||
188 | ||
189 | ||
190 | ||
191 | ||
192 | ||
193 | ||
194 | ||
195 | ||
196 | ||
197 | ||
198 | ||
199 |