This is Info file ./gpc.info, produced by Makeinfo version 1.67 from
the input file ./gpc.texi.

   This file documents the use and the internals of the GNU Pascal
compiler.

   Copyright (C) 1988, 1996 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 also
that the sections entitled "GNU General Public License," "Funding for
Free Software," and "Protect Your Freedom--Fight `Look And Feel'" are
included exactly as in the original, and 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 the sections entitled "GNU General Public
License," "Funding for Free Software," and "Protect Your Freedom--Fight
`Look And Feel'", and this permission notice, may be included in
translations approved by the Free Software Foundation instead of in the
original English.


File: gpc.info,  Node: Intel 960 Options,  Next: DEC Alpha Options,  Prev: HPPA Options,  Up: Submodel Options

Intel 960 Options
-----------------

   These `-m' options are defined for the Intel 960 implementations:

`-mCPU TYPE'
     Assume the defaults for the machine type CPU TYPE for some of the
     other options, including instruction scheduling, floating point
     support, and addressing modes.  The choices for CPU TYPE are `ka',
     `kb', `mc', `ca', `cf', `sa', and `sb'.  The default is `kb'.

`-mnumerics'
`-msoft-float'
     The `-mnumerics' option indicates that the processor does support
     floating-point instructions.  The `-msoft-float' option indicates
     that floating-point support should not be assumed.

`-mleaf-procedures'
`-mno-leaf-procedures'
     Do (or do not) attempt to alter leaf procedures to be callable
     with the `bal' instruction as well as `call'.  This will result in
     more efficient code for explicit calls when the `bal' instruction
     can be substituted by the assembler or linker, but less efficient
     code in other cases, such as calls via function pointers, or using
     a linker that doesn't support this optimization.

`-mtail-call'
`-mno-tail-call'
     Do (or do not) make additional attempts (beyond those of the
     machine-independent portions of the compiler) to optimize
     tail-recursive calls into branches.  You may not want to do this
     because the detection of cases where this is not valid is not
     totally complete.  The default is `-mno-tail-call'.

`-mcomplex-addr'
`-mno-complex-addr'
     Assume (or do not assume) that the use of a complex addressing
     mode is a win on this implementation of the i960.  Complex
     addressing modes may not be worthwhile on the K-series, but they
     definitely are on the C-series.  The default is currently
     `-mcomplex-addr' for all processors except the CB and CC.

`-mcode-align'
`-mno-code-align'
     Align code to 8-byte boundaries for faster fetching (or don't
     bother).  Currently turned on by default for C-series
     implementations only.

`-mic-compat'
`-mic2.0-compat'
`-mic3.0-compat'
     Enable compatibility with iC960 v2.0 or v3.0.

`-masm-compat'
`-mintel-asm'
     Enable compatibility with the iC960 assembler.

`-mstrict-align'
`-mno-strict-align'
     Do not permit (do permit) unaligned accesses.

`-mold-align'
     Enable structure-alignment compatibility with Intel's gcc release
     version 1.3 (based on gcc 1.37).  Currently this is buggy in that
     `#pragma align 1' is always assumed as well, and cannot be turned
     off.


File: gpc.info,  Node: DEC Alpha Options,  Next: Clipper Options,  Prev: Intel 960 Options,  Up: Submodel Options

DEC Alpha Options
-----------------

   These `-m' options are defined for the DEC Alpha implementations:

`-mno-soft-float'
`-msoft-float'
     Use (do not use) the hardware floating-point instructions for
     floating-point operations.  When `-msoft-float' is specified,
     functions in `libgcc1.c' will be used to perform floating-point
     operations.  Unless they are replaced by routines that emulate the
     floating-point operations, or compiled in such a way as to call
     such emulations routines, these routines will issue floating-point
     operations.   If you are compiling for an Alpha without
     floating-point operations, you must ensure that the library is
     built so as not to call them.

     Note that Alpha implementations without floating-point operations
     are required to have floating-point registers.

`-mfp-reg'
`-mno-fp-regs'
     Generate code that uses (does not use) the floating-point register
     set.  `-mno-fp-regs' implies `-msoft-float'.  If the floating-point
     register set is not used, floating point operands are passed in
     integer registers as if they were integers and floating-point
     results are passed in $0 instead of $f0.  This is a non-standard
     calling sequence, so any function with a floating-point argument
     or return value called by code compiled with `-mno-fp-regs' must
     also be compiled with that option.

     A typical use of this option is building a kernel that does not
     use, and hence need not save and restore, any floating-point
     registers.


File: gpc.info,  Node: Clipper Options,  Next: H8/300 Options,  Prev: DEC Alpha Options,  Up: Submodel Options

Clipper Options
---------------

   These `-m' options are defined for the Clipper implementations:

`-mc300'
     Produce code for a C300 Clipper processor. This is the default.

`-mc400'
     Produce code for a C400 Clipper processor i.e. use floating point
     registers f8..f15.


File: gpc.info,  Node: H8/300 Options,  Next: System V Options,  Prev: Clipper Options,  Up: Submodel Options

H8/300 Options
--------------

   These `-m' options are defined for the H8/300 implementations:

`-mrelax'
     Shorten some address references at link time, when possible; uses
     the linker option `-relax'.  *Note `ld' and the H8/300:
     (ld.info)H8/300, for a fuller description.

`-mh'
     Generate code for the H8/300H.


File: gpc.info,  Node: System V Options,  Prev: H8/300 Options,  Up: Submodel Options

Options for System V
--------------------

   These additional options are available on System V Release 4 for
compatibility with other compilers on those systems:

`-Qy'
     Identify the versions of each tool used by the compiler, in a
     `.ident' assembler directive in the output.

`-Qn'
     Refrain from adding `.ident' directives to the output file (this is
     the default).

`-YP,DIRS'
     Search the directories DIRS, and no others, for libraries
     specified with `-l'.

`-Ym,DIR'
     Look in the directory DIR to find the M4 preprocessor.  The
     assembler uses this option.


File: gpc.info,  Node: Environment Variables,  Prev: Submodel Options,  Up: Invoking GPC

Environment Variables Affecting GNU Pascal
==========================================

   This section describes several environment variables that affect how
GNU CC operates.  They work by specifying directories or prefixes to use
when searching for various kinds of files.

   Note that you can also specify places to search using options such as
`-B', `-I' and `-L' (*note Directory Options::.).  These take
precedence over places specified using environment variables, which in
turn take precedence over those specified by the configuration of GNU
CC.  *Note Driver::.

`TMPDIR'
     If `TMPDIR' is set, it specifies the directory to use for temporary
     files.  GNU Pascal uses temporary files to hold the output of one
     stage of compilation which is to be used as input to the next
     stage: for example, the output of the preprocessor, which is the
     input to the compiler proper.

`GPC_EXEC_PREFIX'
     If `GPC_EXEC_PREFIX' is set, it specifies a prefix to use in the
     names of the subprograms executed by the compiler.  No slash is
     added when this prefix is combined with the name of a subprogram,
     but you can specify a prefix that ends with a slash if you wish.

     If GNU Pascal cannot find the subprogram using the specified
     prefix, it tries looking in the usual places for the subprogram.

     The default value of `GPC_EXEC_PREFIX' is `PREFIX/lib/gcc-lib/'
     where PREFIX is the value of `prefix' when you ran the `configure'
     script.

     Other prefixes specified with `-B' take precedence over this
     prefix.

     This prefix is also used for finding files such as `crt0.o' that
     are used for linking.

     In addition, the prefix is used in an unusual way in finding the
     directories to search for header files.  For each of the standard
     directories whose name normally begins with
     `/usr/local/lib/gcc-lib' (more precisely, with the value of
     `GPC_INCLUDE_DIR'), GNU Pascal tries replacing that beginning with
     the specified prefix to produce an alternate directory name.
     Thus, with `-Bfoo/', GNU Pascal will search `foo/bar' where it
     would normally search `/usr/local/lib/bar'.  These alternate
     directories are searched first; the standard directories come next.

`COMPILER_PATH'
     The value of `COMPILER_PATH' is a colon-separated list of
     directories, much like `PATH'.  GNU Pascal tries the directories
     thus specified when searching for subprograms, if it can't find the
     subprograms using `GPC_EXEC_PREFIX'.

`LIBRARY_PATH'
     The value of `LIBRARY_PATH' is a colon-separated list of
     directories, much like `PATH'.  When configured as a native
     compiler, GNU Pascal tries the directories thus specified when
     searching for special linker files, if it can't find them using
     `GPC_EXEC_PREFIX'.  Linking using GNU Pascal also uses these
     directories when searching for ordinary libraries for the `-l'
     option (but directories specified with `-L' come first).

`C_INCLUDE_PATH'
`CPLUS_INCLUDE_PATH'
`OBJC_INCLUDE_PATH'
     These environment variables pertain to particular languages.  Each
     variable's value is a colon-separated list of directories, much
     like `PATH'.  When GNU Pascal searches for header files, it tries
     the directories listed in the variable for the language you are
     using, after the directories specified with `-I' but before the
     standard header file directories.

`DEPENDENCIES_OUTPUT'
     If this variable is set, its value specifies how to output
     dependencies for Make based on the header files processed by the
     compiler.  This output looks much like the output from the `-M'
     option (*note Preprocessor Options::.), but it goes to a separate
     file, and is in addition to the usual results of compilation.

     The value of `DEPENDENCIES_OUTPUT' can be just a file name, in
     which case the Make rules are written to that file, guessing the
     target name from the source file name.  Or the value can have the
     form `FILE TARGET', in which case the rules are written to file
     FILE using TARGET as the target name.


File: gpc.info,  Node: Keywords,  Next: Built-in,  Prev: Invoking GPC,  Up: Top

Keywords and operators supported by GNU Pascal
**********************************************

   This chapter lists all keywords and operators understood by GNU
Pascal.

Keywords
========

   By default, keywords can be redefined to make it possible that every
correct ISO 7185 program can be compiled.  However, you can use the
compiler switches `--pascal-standard', `--pascal-extended',
`--pascal-object', `--pascal-borland', and `--pascal-sc' to tell GPC
that keywords of a given standard must not to be redefined.

   The keywords are taken from the following standards:

   * ISO 7185 Standard Pascal (SP)

   * ISO 10206 Extended Pascal (EP)

   * ANSI draft Object Pascal (OP) *(not yet implemented)*

   * Borland Pascal 7.0 (BP)

   * Pascal-SC (PXSC, Pascal eXtensions for Scientific Calculations)

     Keyword         Pascal standard        Remarks
     --------------------------------------------------------------------------
     Absolute        Borland                overload variables
     Abstract        Object                 not implemented
     All             GNU                    EP "export foo = all" extension
     And             ISO Standard
     And_then        ISO Extended           short-circuit Boolean AND operator
     Array           ISO Standard
     Asm             Borland, GNU           GNU-style assembler
     Begin           ISO Standard
     Bindable        ISO Extended           external binding of files, etc.
     Case            ISO Standard
     Class           Object                 not implemented
     Const           ISO Standard
     Constructor     Object, Borland        only BP version implemented
     Destructor      Object, Borland        only BP version implemented
     Div             ISO Standard
     Do              ISO Standard
     Downto          ISO Standard
     Else            ISO Standard
     End             ISO Standard
     Export          ISO Extended           Module Interface export
     File            ISO Standard
     For             ISO Standard
     Function        ISO Standard
     Goto            ISO Standard
     If              ISO Standard
     Import          ISO Extended           Module Interface import
     Implementation  ISO Extended, Borland  Module (EP) or Unit (BP) Impl. part
     Inherited       Object, Borland        only BP version implemented
     In              ISO Standard
     Inline          Borland, GNU           only GNU inline functions implem.
     Interface       ISO Extended, Borland  Module (EP) or Unit (BP) Int. part
     Is              Object                 not implemented
     Label           ISO Standard
     Mod             ISO Standard
     Module          ISO Extended, PXSC     PXSC version only partially implem.
     Nil             ISO Standard
     Not             ISO Standard
     Object          Borland                BP 7.0 style class definition
     Of              ISO Standard
     Only            ISO Extended           import specification
     Operator        PXSC                   operator definition
     Or              ISO Standard
     Or_else         ISO Extended           short-circuit Boolean OR operator
     Otherwise       ISO Extended           default case label
     Packed          ISO Standard           does not yet pack
     Pow             ISO Extended           exponentiation op. (integer expon.)
     Procedure       ISO Standard
     Program         ISO Standard
     Property        Object                 not implemented
     Protected       ISO Extended           read-only formal parameters
     Qualified       ISO Extended           import specification
     Record          ISO Standard
     Repeat          ISO Standard
     Restricted      ISO Extended           type specification
     Set             ISO Standard
     Shl             Borland                left bit-shift operator
     Shr             Borland                right bit-shift operator
     Then            ISO Standard
     To              ISO Standard
     Type            ISO Standard
     Unit            Borland                Borland (or UCSD) style Modules
     Until           ISO Standard
     Uses            Borland                Borland (or UCSD) style import
     Value           ISO Extended           variable initializer
     Var             ISO Standard
     View            Object                 not implemented
     Virtual         Borland, Object        only Borland version implemented
     While           ISO Standard
     With            ISO Standard
     Xor             Borland                Boolean/bitwise exclusive OR op.

Operators
=========

   GNU Pascal operators, ordered by precedence.

   The PXSC operators `+<', `-<', etc. are not implemented into GNU
Pascal but may be defined by the user.  If you do so and meet the PXSC
requirements, please let us know.  The other real operators do *not*
meet PXSC requirements.

   The Object Pascal operator `IS' is not implemented.

     :=
     <    =    >    IN   <>   >=   <=
     +    -    OR   +<   -<   +>   ->
     *    /    DIV  MOD  AND  SHL  SHR  XOR  *<   /<   *>   />
     POW  **   IS
     NOT


File: gpc.info,  Node: Built-in,  Next: Extensions,  Prev: Keywords,  Up: Top

Redefineable built-in identifiers
*********************************

   The following identifiers are built in into GNU Pascal but may be
redefined according to any supported Pascal standard.

     Maxint
     False
     True
     Input
     Output
     
     Rewrite
     Reset
     Put
     Get
     Write
     Read
     Writeln
     Readln
     Page
     New
     Dispose
     Abs
     Sqr
     Sin
     Cos
     Exp
     Ln
     Sqrt
     Arctan
     Trunc
     Round
     Pack
     Unpack
     Ord
     Chr
     Succ
     Pred
     Odd
     Eof
     Eoln

   Directives

     Asmname            Specify case-sensitive external name for Function
     C                  External name for Function shall be lowercase
     C_language         same as C
     Forward
     External           External Name of Function Has First Letter Uppercase
     Extern             same as External

   Extended Pascal required module interfaces

     Standardoutput
     Standardinput

   Object Pascal directive (not implemented)

     Override

   Extended Pascal required words

     Maxchar
     Maxreal
     Minreal
     Epsreal

   Extended Pascal required Procedures and Functions

     Gettimestamp
     Date
     Time
     Halt
     Extend
     Seekwrite
     Seekread
     Seekupdate
     Empty
     Update
     Position
     Lastposition
     Re
     Im
     Cmplx
     Card
     Arg

   Extended Pascal external binding

     Bind
     Unbind
     Binding

   Extended Pascal complex type functions

     Polar

   Extended Pascal String functions

     Readstr            Read from a string rather than a file
     Writestr           Write to a string rather than a file
     Length
     Index              Search in a string
     Substr             also `MyStr [ 1..5 ]'
     Trim
     Eq                 lexical string comparision
     Lt
     Gt
     Ne
     Le
     Ge

   Extended pascal required string schema type generator

     String

   Object pascal (not implemented)

     Copy
     Null
     Root
     Textwritable
     Self

   Borland Pascal

     GetMem             Allocate memory with given size in bytes
     FreeMem            Free memory allocated with GetMem
     Inc                Increment
     Dec                Decrement

   More exotic fruits and birds (GPC extensions)

     Static             C-sense storage class specifications
     __const__
     __external__
     __inline__
     __static__
     __volatile__
     __byte__           C-style type size modifiers
     __short__
     __long__
     __longlong__
     __unsigned__
     
     Asm                Inline assembly (GNU style)
     Alignof
     Break              C-style
     Continue
     Return
     Sizeof
     Max                for enumeral and real types
     Min
     
     Conjugate
     Mark
     Release
     
     Default            like `otherwise' in a `case' statement
     Others
     
     Close
     Definesize

   Standard Pascal data types

     Integer
     Real
     Boolean
     Char
     Text

   Extended Pascal complex type

     Complex

   GPC extensions: void type (two spellings)

     __void__
     Void

   GPC extension: C compatibility string type

     __cstring__

   Extended Pascal: TimeStamp and BindingType

     Timestamp
     Bindingtype

