GPC(1)

NAME
gpc - GNU project Pascal Compiler (v2.0)

SYNOPSIS
gpc [ option | filename ]...

WARNING
The information in this man page is an extract from the full documentation of the GNU Pascal compiler, and is limited to the meaning of the options.

This man page is not kept up to date except when volunteers want to maintain it. If you find a discrepancy between the man page and the software, please check the Info file, which is the authoritative documentation.

If we find that the things in this man page that are out of date cause significant confusion or complaints, we will stop distributing the man page. The alternative, updating the man page when we update the Info file, is impossible because the rest of the work of maintaining GNU Pascal leaves us no time for that. The GNU project regards man pages as obsolete and should not let them take time away from other things.

For complete and current documentation, refer to the Info file `gpc ' or the manual Using and Porting GNU Pascal. Both are made from the Texinfo source file gpc.texi.

DESCRIPTION
The Pascal and C compilers are integrated; gpc is a driver program to call gcc with options to recognize Pascal. gcc processes input files through one or more of four stages: preprocessing, compilation, assembly, and linking. This man page contains full descriptions for only Pascal specific aspects of the compiler, though it also contains summaries of some general-purpose options. For a fuller explanation of the compiler, see gcc(1). Pascal source files use one of the suffixes `.p ', or `.pas '; preprocessed Pascal files use the suffix `.i '.

OPTIONS
There are many command-line options, including options to control details of optimization, warnings, and code generation, which are common to both gcc and gpc . For full information on all options, see gcc(1). Options must be separate: `-dr ' is quite different from `-d -r '. Most `-f ' and `-W ' options have two contrary forms: -fname and -fno-name (or -Wname and -Wno-name ). Only the non-default forms are shown here.

Overall Options
    -c -S -E -o file --automake -pipe -v

Language Options
    --standard-pascal-level-0 --standard-pascal --extended-pascal --object-pascal --borland-pascal --pascal-sc --borland-char-constants --char-escapes --c-numbers --extended-syntax --no-nested-comments

Warning Options
    --syntax-only --pedantic --pedantic-errors -w -W -Wall -Waggregate-return -Wbad-function-cast -Wcast-align -Wcast-qual -Wchar-subscript -Wcomment -Wconversion -Wenum-clash -Werror -Wformat -Wid-clash-len -Wimplicit -Wimport -Winline -Wlarger-than-len -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wno-import -Woverloaded-virtual -Wparentheses -Wpointer-arith -Wredundant-decls -Wreorder -Wreturn-type -Wshadow -Wstrict-prototypes -Wswitch -Wsynth -Wtemplate-debugging -Wtraditional -Wtrigraphs -Wuninitialized -Wunused -Wwrite-strings

Debugging Options
    -a -dletters -fpretend-float -g -glevel -gcoff -gxcoff -gxcoff+ -gdwarf -gdwarf+ -gstabs -gstabs+ -ggdb -p -pg -save-temps -print-file-name=library -print-libgcc-file-name -print-prog-name=program -print-search-dirs -save-temps --lines --debug-gpi

Optimization Options
    -fcaller-saves -fcse-follow-jumps -fcse-skip-blocks -fdelayed-branch -felide-constructors -fexpensive-optimizations -ffast-math -ffloat-store -fforce-addr -fforce-mem -finline-functions -fkeep-inline-functions -fmemoize-lookups -fno-default-inline -fno-defer-pop -fno-function-cse -fno-inline -fno-peephole -fomit-frame-pointer -frerun-cse-after-loop -fschedule-insns -fschedule-insns2 -fstrength-reduce -fthread-jumps -funroll-all-loops -funroll-loops -O -O1 -O2 -O3

Preprocessor Options
    -Aassertion -C -dD -dM -dN -Dmacro[=defn] -E -H -idirafter dir -include file -imacros file -iprefix file -iwithprefix dir -M -MD -MM -MMD -nostdinc -P -Umacro -undef -Wp,option

Assembler Option
    -Wa,option

Linker Options
    -llibrary -nostartfiles -nostdlib -static -shared -symbolic -Xlinker option -Wl,option -u symbol

Directory Options
    -Bprefix -Idir -I- -Ldir

Target Options
    -b machine -V version

Configuration Dependent Options
    M680x0 Options
    -m68000 -m68020 -m68020-40 -m68030 -m68040 -m68881 -mbitfield -mc68000 -mc68020 -mfpa -mnobitfield -mrtd -mshort -msoft-float

    VAX Options
    -mg -mgnu -munix

    SPARC Options
    -mepilogue -mfpu -mhard-float -mno-fpu -mno-epilogue -msoft-float -msparclite -mv8 -msupersparc -mcypress

    Convex Options
    -margcount -mc1 -mc2 -mnoargcount

    AMD29K Options
    -m29000 -m29050 -mbw -mdw -mkernel-registers -mlarge -mnbw -mnodw -msmall -mstack-check -muser-registers

    M88K Options
    -m88000 -m88100 -m88110 -mbig-pic -mcheck-zero-division -mhandle-large-shift -midentify-revision -mno-check-zero-division -mno-ocs-debug-info -mno-ocs-frame-position -mno-optimize-arg-area -mno-serialize-volatile -mno-underscores -mocs-debug-info -mocs-frame-position -moptimize-arg-area -mserialize-volatile -mshort-data-num -msvr3 -msvr4 -mtrap-large-shift -muse-div-instruction -mversion-03.00 -mwarn-passed-structs

    RS6000 Options
    -mfp-in-toc -mno-fop-in-toc

    RT Options
    -mcall-lib-mul -mfp-arg-in-fpregs -mfp-arg-in-gregs -mfull-fp-blocks -mhc-struct-return -min-line-mul -mminimum-fp-blocks -mnohc-struct-return

    MIPS Options
    -mcpu=cpu type -mips2 -mips3 -mint64 -mlong64 -mlonglong128 -mmips-as -mgas -mrnames -mno-rnames -mgpopt -mno-gpopt -mstats -mno-stats -mmemcpy -mno-memcpy -mno-mips-tfile -mmips-tfile -msoft-float -mhard-float -mabicalls -mno-abicalls -mhalf-pic -mno-half-pic -G num -nocpp

    i386 Options
    -m486 -mno-486 -msoft-float -mno-fp-ret-in-387

    HPPA Options
    -mpa-risc-1-0 -mpa-risc-1-1 -mkernel -mshared-libs -mno-shared-libs -mlong-calls -mdisable-fpregs -mdisable-indexing -mtrailing-colon

    i960 Options
    -mcpu-type -mnumerics -msoft-float -mleaf-procedures -mno-leaf-procedures -mtail-call -mno-tail-call -mcomplex-addr -mno-complex-addr -mcode-align -mno-code-align -mic-compat -mic2.0-compat -mic3.0-compat -masm-compat -mintel-asm -mstrict-align -mno-strict-align -mold-align -mno-old-align

    DEC Alpha Options
    -mfp-regs -mno-fp-regs -mno-soft-float -msoft-float

    System V Options
    -G -Qy -Qn -YP,paths -Ym,dir

Code Generation Options
    -fcall-saved-reg -fcall-used-reg -ffixed-reg -fgpc-main:name -finhibit-size-directive -flazy-io -fnonnull-objects -fno-common -fno-ident -fno-gnu-linker -fpcc-struct-return -fpic -fPIC -freg-struct-return -fsetlimit:number -fshared-data -fshort-enums -fshort-double -fshort-circuit -fvolatile -fvolatile-global -fverbose-asm

OVERALL OPTIONS

-c  Compile or assemble the source files, but do not link. The compiler output is an object file corresponding to each source file.

    By default, GPC makes the object file name for a source file by replacing the suffix `.p ', `.pas ', `.i ', `.s ', etc., with `.o '. Use -o to select another name.

    GPC ignores any unrecognized input files (those that do not require compilation or assembly) with the -c option.

-S  Stop after the stage of compilation proper; do not assemble. The output is an assembler code file for each non-assembler input file specified.

    By default, GPC makes the assembler file name for a source file by replacing the suffix `.p ', `.pas ', `.i ', etc., with `.s '. Use -o to select another name.

    GPC ignores any input files that don't require compilation.

-E  Stop after the preprocessing stage; do not run the compiler proper. The output is preprocessed source code, which is sent to the standard output.

    GPC ignores input files which don't require preprocessing.

-o file
    Place output in file file . This applies regardless to whatever sort of output GPC is producing, whether it be an executable file, an object file, an assembler file or preprocessed Pascal code.

    Since only one output file can be specified, it does not make sense to use `-o ' when compiling more than one input file, unless you are producing an executable file as output.

    If you do not specify `-o ', the default is to put an executable file in `a.out ', the object file for `source . suffix ' in `source .o ', its assembler file in `source .s ', and all preprocessed Pascal source on standard output.

--automake
    Check whether Modules/Units used by the main program must be recompiled and do the recompilation. For example, if the program mainprog.pas uses the Modules module1.pas and module2.pas , the modules are automatically compiled if necessary when you specify gpc --automake mainprog.pas .

    WARNING: The AutoMake mechanism is a new feature in version 2.0 and may be unstable.

-v  Print (on standard error output) the commands executed to run the stages of compilation. Also print the version number of the compiler driver program and of the preprocessor and the compiler proper.

-pipe
    Use pipes rather than temporary files for communication between the various stages of compilation. This fails to work on some systems where the assembler cannot read from a pipe; but the GNU assembler has no trouble.

LANGUAGE OPTIONS
The following options control the dialect of Pascal that the compiler accepts:

--standard-pascal-level-0

--standard-pascal

--extended-pascal

--object-pascal

--borland-pascal

--pascal-sc
    These switches tell GPC to comply to the specified standard. Keywords coming from other dialects are not recognized and can be redefined without warning. The use of other extensions triggers a warning; other warnings about constructs which would be legal in the specified dialect (e.g. assignment to a Borland-style `typed constant') are suppressed. By default, GNU Pascal allows redefinition of keywords. Each of this switches causes GNU Pascal to forbid the redefinition of keywords of the specified standard. Valid ISO Standard Pascal programs should compile properly with or without `--standard-pascal '. However, without this option, certain GNU extensions and Pascal features from other dialects are supported as well. With this option, they are rejected. This options are not intended to be useful ; they exist only to satisfy pedants who would otherwise claim that GNU Pascal fails to support the ISO Standard or is not really compatible to Borland Pascal, or whatever. We recommend, rather, that users take advantage of the extensions of GNU Pascal and disregard the limitations of other compilers.

--borland-char-constants
    Enable Borland-style `#42 ' character constants. The default is `on' unless full ISO compliance has been selected using `--standard-pascal ', `--extended-pascal ', or `--object-pascal '. For those cases the default is `off'.

--char-escapes (*$E+*)
    Enable C-style character escape sequences in strings.

--c-numbers (*$C+*)
    Enable C-style octal and hexadecimal numbers: The decimal number 255 is equal to the hexadecimal number `16#FF ' (Extended Pascal notation) or `$FF ' (Borland Pascal notation) or `0xFF ' (C notation -- works only with this switch active) or the octal number `0177 ' (C notation -- ditto).

--extended-syntax (*$X+*)
    Enables `dangerous' features of GNU Pascal such as:

•   function return value ignore (works always, but gives warning without `--extended-syntax ' or `$X+ '),

•   inline assembler code,

•   other extensions we are working on.

--no-nested-comments (*$N-*)
    By default (unless full ISO compliance has been requested), GPC allows nested comments (* like this one { see? } *) in your Pascal source which contradicts ISO standard. To allow comments starting with `{ ' and ending with `*) ', specify this option.

CODE GENERATION OPTIONS
These machine-independent options control the interface conventions used in code generation.

Most of them begin with `-f'. These options have both positive and negative forms; the negative form of `-ffoo ' would be `-fno-foo '. In the table below, only one of the forms is listed—the one which is not the default. You can figure out the other form by either removing `no- ' or adding it.

-fshort-circuit (*$B-*)
    Use short circuit evaluation of Boolean expressions. Otherwise, Boolean expressions are evaluated completely even if the result is kwown already. The default is `on' unless full ISO compliance has been requested using `--standard-pascal ', `--extended-pascal ' or `--object-pascal '. For those cases the default is `off'.

-flazy-io (*$L+*)
    Enable `lazy I/O', i.e. do a `put' as soon as you can and do `get' as late as you can.

-fsetlimit:number
    Define the maximum number of elements a set can hold to be number .

-fgpc-main:name
    Name the entry point of the main program name instead of main . This is useful when working with some C libraries which define their own main function and require the program's `main' to be named differently.

FILES
file.i    preprocessed Pascal source file
file.p    Pascal source file
file.pas    Pascal source file
file.s    assembly language file
file.o    object file
a.out    link edited output
TMPDIR/pc*    temporary files
LIBDIR/gpc-cpp    preprocessor
LIBDIR/gpc1    compiler
LIBDIR/collect    linker front end needed on some machines
LIBDIR/libgcc.a    GCC subroutine library
LIBDIR/libgpc.a    GPC runtime library
/lib/crt[01n].o    start-up routine

LIBDIR is usually /usr/local/lib/ machine/version.
TMPDIR comes from the environment variable TMPDIR (default /usr/tmp if available, else /tmp ).

SEE ALSO
gcc(1), cpp(1), as(1), ld(1), gdb(1), adb(1), dbx(1), sdb(1).
`gpc', `gcc', `cpp', `as',`ld', and `gdb' entries in info .
Using and Porting GNU Pascal, Jan-Jaap van der Heijden and Peter Gerwinski; Using and Porting GNU CC (for version 2.0), Richard M. Stallman; The C Preprocessor, Richard M. Stallman; Debugging with GDB: the GNU Source-Level Debugger, Richard M. Stallman and Roland H. Pesch; Using as: the GNU Assembler, Dean Elsner, Jay Fenlason & friends; gld: the GNU linker, Steve Chamberlain and Roland Pesch.

BUGS
For instructions on how to report bugs, see the GNU Pascal manual.

COPYING
Copyright (c) 1997 Free Software Foundation, Inc.

Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are preserved on all copies.

Permission is granted to copy and distribute modified versions of this manual under the conditions for verbatim copying, provided that the entire resulting derived work is distributed under the terms of a permission notice identical to this one.

Permission is granted to copy and distribute translations of this manual into another language, under the above conditions for modified versions, except that this permission notice may be included in translations approved by the Free Software Foundation instead of in the original English.

AUTHORS
See the GNU Pascal Manual for the contributors to GNU Pascal.