PC(1) — HP-UX
NAME
pc − Pascal compiler
SYNOPSIS
pc [ options ] files
REMARKS
This manual page describes the generic HP Pascal compiler; implementation dependencies for different machines are noted as needed.
DESCRIPTION
Pc is the HP standard Pascal compiler. It accepts several types of file arguments:
(1) Arguments whose names end with .p are taken to be Pascal source files. They are each compiled, and each corresponding object program or module(s) is left in the current directory in a file whose name is that of the source, with .o substituted for .p. The .o file will be immediately deleted (leaving only the linked executable file) if only a single source is compiled and linked, if the −C option is specified, or if the source fails to compile correctly.
(2) All other file arguments, including those whose names end with .o or .a, are passed on to the linker (ld(1)) to be linked into the final program.
Arguments can be passed to the compiler through the PCOPTS environment variable as well as on the command line. The compiler picks up the value of PCOPTS and places its contents before any arguments on the command line. For example (in sh(1) notation),
$ PCOPTS=-v
$ export PCOPTS
$ pc -L prog.p
is equivalent to
$ pc -v -L prog.p
Options
The following options are recognized:
−A Produce warnings for the use of non-ANSI-Pascal features. (Same as $ANSI ON$).
−C Suppress code generation. No .o files will be created and linking will be suppressed. This is effectively a request for syntax/semantic checking only (same as $CODE OFF$).
−c Suppress linking and only produce object (.o) files from source files.
−g Generate additional information needed by a symbolic debugger, and ensure that the program is linked as required. See the appropriate implementation reference manual for more information on symbolic debugging support.
−L Write a program listing to stdout (see the HARDWARE DEPENDENCIES section below for exceptions).
−lx Cause the linker to search first in the library named /lib/libx.a and then in /usr/lib/libx.a (see ld(1)).
−N Cause the output file from the linker to be marked as unshareable (see −n). For details and system defaults, refer to the linker documentation (ld(1)).
−n Cause the output file from the linker to be marked as shareable (see −N). For details and system defaults, refer to the linker documentation (ld(1)).
−o outfile Name the output file from the linker outfile instead of a.out.
−P lines Specifies the number of lines (including any header or trailer) which should be listed per page of generated listing (same as $LINES n$).
−Q Cause the output file from the linker to be marked as not demand loadable (see −q). For details and system defaults, refer to the linker documentation (ld(1)).
−q Cause the output file from the linker to be marked as demand loadable (see −Q). For details and system defaults, refer to the linker documentation (ld(1)).
−s Cause the output of the linker to be stripped of symbol table information (see ld(1) and strip(1)). (This option is incompatible with symbolic debugging.)
−t c,name Substitute or insert subprocess c with name where c is one or more of an implementation-defined set of identifiers indicating the subprocess(es). This option works in two modes: 1) if c is a single identifier, name represents the full pathname of the new subprocess; 2) if c is a set of (more than one) identifiers, name represents a prefix to which the standard suffixes are concatenated to construct the full path name of the new subprocesses. The values c can assume are:
c compiler body (standard suffix is pascomp)
0 same as c
l linker (standard suffix is ld)
−v Enable verbose mode, producing a step-by-step description of the compilation process on stderr.
−w Suppress warning messages (same as $WARN OFF$).
−W c,arg1[,arg2,...,argN]
Cause arg1 through argN to be handed off to subprocess c. The argi are of the form −argoption[,argvalue], where argoption is the name of an option recognized by the subprocess and argvalue is a separate argument to argoption where necessary. The values that c can assume are those listed under the −t option, as well as the value d (driver program), which has a special meaning explained below.
For example, the specification to pass the -r (preserve relocation information) option to the linker would be:
-W l,-r
The −W d option specification allows additional, implementation-specific options to be recognized and passed through the compiler driver to the appropriate compiler subprocesses. For example, on Series 500:
-W d,-U
will send the option −U to the driver and compiler. Furthermore, a shorthand notation for this mechanism can be used by prepending + to the option name; as in
+U
which is equivalent to the previous option expression. Note that for simplicity this shorthand is applied to each implementation-specific option individually, and that the argvalue is no longer separated from the argoption by a comma (see −W).
HARDWARE DEPENDENCIES
Series 200, 300, 500:
The following option is supported:
−Y Enable 16-bit Native Language Support when parsing string literals and comments (same as $NLS_SOURCE$). Note that 8-bit parsing is always supported.
Series 200, 300 and Integral PC:
The −L option writes a program listing to the file given in the $LIST filename$ option in the source, instead of to stdout.
The following option is implemented only on the Series 200, 300 and the Integral PC:
+a Cause the compiler to generate archived object (.a) files instead of simple object (.o) files. This allows source files containing multiple HP Pascal modules to be compiled such that each module can be linked independently. Use of this option is discouraged for portability reasons. It is provided to facilitate migration from Series 200 HP-UX releases prior to Release 5.1 (where .a files were always generated), to 5.1 and subsequent releases. Otherwise, it is recommended that modules needing separate linkability be placed in separate source files. To facilitate use of previously existing makefiles and scripts that depended on the archive generation, the PCOPTS environment variable can be used (e.g., set PCOPTS="+a $PCOPTS").
Series 200, 300:
The following options are implemented only on the Series 200 and 300:
+A Cause the compiler to always use 2-byte data and stack alignment rules instead of default 4-byte alignment rules for stacks and data objects exceeding four bytes when generating object code for MC68020 systems (see reference manual and +x option below for more details).
+X Cause the compiler to generate "generic" MC68010 code. The code can also run on an MC68020 microprocessor, but cannot use its expanded capabilities.
+x Cause the compiler to generate code that utilizes the expanded capabilities of the MC68020 and generates in-line code for the MC68881.
+M Cause the compiler not to generate inline code for the MC68881 floating-point coprocessor. Library routines will be referenced for math and intrinsic operations. This option is meaningless on MC68010 based systems or in conjunction with +X.
Series 500:
The following options are not supported: −b, −e, and −f.
The following options must be specified with the −W d,... option or the + shorthand: −E, −F, −H [bytes], and −W [bytes].
The following options are implemented only on the Series 500:
+E Cause the program to be linked with the library /lib/libpcesc.a, which transforms all execution errors (HP-UX signals, Pascal run-time errors, Pascal I/O errors and HP-UX errors) into escapes. This differs from the default library /lib/libpccat.a, which prints the appropriate error message and aborts the program.
+F Cause the compiler to generate information for use by various program analyzers.
+H [bytes]
Display (if bytes is omitted) or set a Pascal program’s maximum heap size. Bytes is the maximum number of bytes in the heap.
+Q dfile Cause dfile to be read before compilation of each source file. Dfile may only contain compiler options.
+U Cause the compiler to upshift externally visible names. Default is lowercase (same as $UPSHIFT_LEVEL1 ON$).
+W [bytes]
Display (if bytes is omitted) or set a Pascal program’s working set size. Bytes is the number of bytes in the program’s working set.
To use the +H or +W options on an executable file other than a.out, the file to be examined (modified) must be specified with the −o option. For example, to set the heap of program foo to 1000000, use:
pc +H 1000000 -o foo do not use:
pc +H 1000000 -W l,-o,foo
Series 800:
The following options are not supported: −P, −t, −w.
The following option is implemented only on the Series 800:
+Oopt Invoke optimizations selected by opt. If opt is ‘1’, then only level 1 optimizations are handled. If opt is ‘2’, then all optimizations are performed. The option +O2 is the same as −O.
FILES
file.p input file (Pascal source file)
file.a any archive file to be searched at link time (or for the Series 200, Series 300, and Integral PC only, optionally generated object archive file)
file.o compiler-generated or other object file that is to be relocated at link time
a.out linked executable output file
/usr/lib/pascomp compiler
/usr/lib/paserrs compiler error message file
/usr/lib/escerrs Pascal escape codes (Series 200, Series 300, and Integral PC only)
/usr/lib/syserrs HP-UX system messages (Series 200, Series 300, and Integral PC only)
/usr/lib/ioerrs Pascal I/O results (Series 200, Series 300, and Integral PC only)
/lib/crt0.o runtime startup (except Series 500)
/lib/prt0.o runtime startup (Series 500 only)
/lib/libpc.a Pascal run-time library (except Series 800)
/lib/libcl.a Pascal run-time library (Series 800 only)
/lib/libm.a HP−UX math library (Series 200, Series 300, and Integral PC only)
/lib/libpccat.a Pascal run-time library, reports errors and aborts program (Series 500 only)
/lib/libpcesc.a Pascal run-time library, translates errors into escapes (Series 500 only)
/lib/libc.a HP-UX system library (C-language library)
/usr/tmp/∗ temporary files used by the compiler; names are created by tmpnam(3S).
SEE ALSO
HP Pascal Language Reference for Series 200, Series 300 (also valid for Integral PC). Pascal/9000 Language Reference Manual, for Series 500. Programming in Pascal with Hewlett-Packard Pascal, by Peter Grogono.
DIAGNOSTICS
The diagnostics produced by pc are intended to be self-explanatory. Occasional messages may be produced by the linker.
A list of all compiler errors may be found in /usr/lib/paserrs.
If a listing is requested (−L option), errors are written to the listing file (stdout). If a listing is requested and either or both of stdout/stderr has been redirected to something other than a terminal, errors will also be written to stderr. If no listing is requested (no −L option), errors are written to stderr. This effectively guarantees that stderr will always receive error messages, unless that would result in duplication of error messages printed on the terminal.
INTERNATIONAL SUPPORT
8- and 16-bit data only in strings and comments, 8-bit filenames.
Hewlett-Packard Company — Version B.1, April 12, 1993