This section lists the messages that the scanner emits. The scanner takes care of the lexical
structure of the pascal file, i.e. it tries to find reserved words, strings, etc. It also takes care of
directives and conditional compilation handling.
-
Fatal: Unexpected end of file
- This typically happens in one of the following cases:
- The source file ends before the final end. statement. This happens mostly when
the begin and end statements are not balanced;
- An include file ends in the middle of a statement.
- A comment was not closed.
-
Fatal: String exceeds line
- There is a missing closing ’ in a string, so it occupies multiple
lines.
-
Fatal: illegal character ”arg1” (arg2)
- An illegal character was encountered in the input
file.
-
Fatal: Syntax error, ”arg1” expected but ”arg2” found
- This indicates that the compiler
expected a different token than the one you typed. It can occur almost anywhere it is possible
to make an error against the Pascal language.
-
Start reading includefile arg1
- When you provide the -vt switch, the compiler tells you when it
starts reading an included file.
-
Warning: Comment level arg1 found
- When the -vw switch is used, then the compiler warns
you if it finds nested comments. Nested comments are not allowed in Turbo Pascal and
Delphi, and can be a possible source of errors.
-
Note: Ignored compiler switch ”arg1”
- With -vn on, the compiler warns if it ignores a
switch.
-
Warning: Illegal compiler switch ”arg1”
- You included a compiler switch (i.e. {$... }) which
the compiler does not recognise.
-
Warning: Misplaced global compiler switch, ignored
- The compiler switch is misplaced. It
must be located at the start of the compilation unit, before the uses clause or any
declaration.
-
Error: Illegal char constant
- This happens when you specify a character with its ASCII code, as
in #96, but the number is either illegal, or out of range.
-
Fatal: Cannot open file ”arg1”
- Free Pascal cannot find the program or unit source file you
specified on the command line.
-
Fatal: Cannot open include file ”arg1”
- Free Pascal cannot find the source file you specified in
a {$include ..} statement.
-
Error: Illegal record alignment specifier ”arg1”
- You are specifying {$PACKRECORDS n} or
{$ALIGN n} with an illegal value for n. For $PACKRECORDS valid alignments are 1, 2, 4,
8, 16, 32, C, NORMAL, DEFAULT, and for $ALIGN valid alignments are 1, 2, 4, 8, 16, 32,
ON, OFF. Under mode MacPas $ALIGN also supports MAC68K, POWER and
RESET.
-
Error: Illegal enum minimum-size specifier ”arg1”
- You are specifying the {$PACKENUM n}
with an illegal value for n. Only 1,2,4, NORMAL or DEFAULT is valid here.
-
Error: $ENDIF expected for arg1 arg2 defined in arg3 line arg4
- Your conditional
compilation statements are unbalanced.
-
Error: Syntax error while parsing a conditional compiling expression
- There is an
error in the expression following the {$if ..}, {$ifc } or {$setc } compiler
directives.
-
Error: Evaluating a conditional compiling expression
- There is an error in the expression
following the {$if ..}, ifcorsetc compiler directives.
-
Warning: Macro contents are limited to 255 characters in length
- The contents of macros
cannot be longer than 255 characters.
-
Error: ENDIF without IF(N)DEF
- Your {$IFDEF ..} and {$ENDIF} statements are not
balanced.
-
Fatal: User defined: arg1
- A user defined fatal error occurred. See also the Programmer’s
Guide.
-
Error: User defined: arg1
- A user defined error occurred. See also the Programmer’s
Guide.
-
Warning: User defined: arg1
- A user defined warning occurred. See also the Programmer’s
Guide.
-
Note: User defined: arg1
- A user defined note was encountered. See also the Programmer’s
Guide.
-
Hint: User defined: arg1
- A user defined hint was encountered. See also the Programmer’s
Guide.
-
Info: User defined: arg1
- User defined information was encountered. See also the Programmer’s
Guide.
-
Error: Keyword redefined as macro has no effect
- You cannot redefine keywords with
macros.
-
Fatal: Macro buffer overflow while reading or expanding a macro
- Your macro or its
result was too long for the compiler.
-
Warning: Expanding of macros exceeds a depth of 16.
- When expanding a macro, macros
have been nested to a level of 16. The compiler will expand no further, since this may be a
sign that recursion is used.
-
Warning: compiler switches are not supported in // styled comments
- Compiler switches
should be in normal Pascal style comments.
-
Handling switch ”arg1”
- When you set debugging info on (-vd) the compiler tells you when it is
evaluating conditional compile statements.
-
ENDIF arg1 found
- When you turn on conditional messages (-vc), the compiler tells you where
it encounters conditional statements.
-
IFDEF arg1 found, arg2
- When you turn on conditional messages (-vc), the compiler tells you
where it encounters conditional statements.
-
IFOPT arg1 found, arg2
- When you turn on conditional messages (-vc), the compiler tells you
where it encounters conditional statements.
-
IF arg1 found, arg2
- When you turn on conditional messages (-vc), the compiler tells you where
it encounters conditional statements.
-
IFNDEF arg1 found, arg2
- When you turn on conditional messages (-vc), the compiler tells
you where it encounters conditional statements.
-
ELSE arg1 found, arg2
- When you turn on conditional messages (-vc), the compiler tells you
where it encounters conditional statements.
-
Skipping until...
- When you turn on conditional messages (-vc), the compiler tells you
where it encounters conditional statements, and whether it is skipping or compiling
parts.
-
Info: Press ¡return¿ to continue
- When the -vi switch is used, the compiler stops
compilation and waits for the Enter key to be pressed when it encounters a {$STOP}
directive.
-
Warning: Unsupported switch ”arg1”
- When warnings are turned on (-vw), the compiler
warns you about unsupported switches. This means that the switch is used in Delphi or
Turbo Pascal, but not in Free Pascal.
-
Warning: Illegal compiler directive ”arg1”
- When warnings are turned on (-vw), the compiler
warns you about unrecognised switches. For a list of recognised switches, see the
Programmer’s Guide.
-
Back in arg1
- When you use the -vt switch, the compiler tells you when it has finished reading
an include file.
-
Warning: Unsupported application type: ”arg1”
- You get this warning if you specify an
unknown application type with the directive {$APPTYPE}.
-
Warning: APPTYPE is not supported by the target OS
- The {$APPTYPE} directive is
supported by certain operating systems only.
-
Warning: DESCRIPTION is not supported by the target OS
- The {$DESCRIPTION}
directive is not supported on this target OS.
-
Note: VERSION is not supported by target OS
- The {$VERSION} directive is not supported
on this target OS.
-
Note: VERSION only for exes or DLLs
- The {$VERSION} directive is only used for executable
or DLL sources.
-
Warning: Wrong format for VERSION directive ”arg1”
- The {$VERSION} directive
format is majorversion.minorversion where majorversion and minorversion are
words.
-
Error: Illegal assembler style specified ”arg1”
- When you specify an assembler mode
with the {$ASMMODE xxx} directive, the compiler didn’t recognize the mode you
specified.
-
Warning: ASM reader switch is not possible inside asm statement, ”arg1” will be effective only for next
-
It is not possible to switch from one assembler reader to another inside an assembler block.
The new reader will be used for next assembler statements only.
-
Error: Wrong switch toggle, use ON/OFF or +/-
- You need to use ON or OFF or a + or -
to toggle the switch.
-
Error: Resource files are not supported for this target
- The target you are compiling for
doesn’t support resource files.
-
Warning: Include environment ”arg1” not found in environment
- The included
environment variable cannot be found in the environment; it will be replaced by an empty
string instead.
-
Error: Illegal value for FPU register limit
- Valid values for this directive are 0..8 and
NORMAL/DEFAULT.
-
Warning: Only one resource file is supported for this target
- The target you are compiling
for supports only one resource file. The first resource file found is used, the others are
discarded.
-
Warning: Macro support has been turned off
- A macro declaration has been found, but
macro support is currently off, so the declaration will be ignored. To turn macro
support on compile with -Sm on the command line or add {$MACRO ON} in the
source.
-
Error: Illegal interface type specified. Valids are COM, CORBA or DEFAULT.
- The
interface type that was specified is not supported.
-
Warning: APPID is only supported for PalmOS
- The {$APPID} directive is only supported
for the PalmOS target.
-
Warning: APPNAME is only supported for PalmOS
- The {$APPNAME} directive is only
supported for the PalmOS target.
-
Error: Constant strings cannot be longer than 255 chars
- A single string constant can
contain at most 255 chars. Try splitting up the string into multiple smaller parts and
concatenate them with a + operator.
-
Fatal: Including include files exceeds a depth of 16.
- When including include files the files
have been nested to a level of 16. The compiler will expand no further, since this may be a
sign that recursion is used.
-
Fatal: Too many levels of PUSH
- A maximum of 20 levels is allowed. This error occurs only in
mode MacPas.
-
Error: A POP without a preceding PUSH
- This error occurs only in mode MacPas.
-
Error: Macro or compile time variable ”arg1” does not have any value
- Thus the
conditional compile time expression cannot be evaluated.
-
Error: Wrong switch toggle, use ON/OFF/DEFAULT or +/-/*
- You need to use ON or
OFF or DEFAULT or a + or - or * to toggle the switch.
-
Error: Mode switch ”arg1” not allowed here
- A mode switch has already been encountered,
or, in the case of option -Mmacpas, a mode switch occurs after UNIT.
-
Error: Compile time variable or macro ”arg1” is not defined.
- Thus the conditional
compile time expression cannot be evaluated. Only in mode MacPas.
-
Error: UTF-8 code greater than 65535 found
- Free Pascal handles UTF-8 strings internally
as widestrings, i.e. the char codes are limited to 65535.
-
Error: Malformed UTF-8 string
- The given string isn’t a valid UTF-8 string.
-
UTF-8 signature found, using UTF-8 encoding
- The compiler found a UTF-8 encoding
signature ($ef, $bb, $bf) at the beginning of a file, so it interprets it as a UTF-8
file.
-
Error: Compile time expression: Wanted arg1 but got arg2 at arg3
- The type-check of a
compile time expression failed.
-
Note: APPTYPE is not supported by the target OS
- The {$APPTYPE} directive is
supported by certain operating systems only.
-
Error: Illegal optimization specified ”arg1”
- You specified an optimization with the
{$OPTIMIZATION xxx} directive, and the compiler didn’t recognize the optimization you
specified.
-
Warning: SETPEFLAGS is not supported by the target OS
- The {$SETPEFLAGS} directive
is not supported by the target OS.
-
Warning: IMAGEBASE is not supported by the target OS
- The {$IMAGEBASE} directive is
not supported by the target OS.
-
Warning: MINSTACKSIZE is not supported by the target OS
- The {$MINSTACKSIZE}
directive is not supported by the target OS.
-
Warning: MAXSTACKSIZE is not supported by the target OS
- The {$MAXSTACKSIZE}
directive is not supported by the target OS.
-
Error: Illegal state ”arg1” for $WARN directive
- Only ON and OFF can be used as state
with a {$WARN} compiler directive.
-
Error: Illegal set packing value
- Only 0, 1, 2, 4, 8, DEFAULT and NORMAL are allowed as
packset parameters.
-
Warning: PIC directive or switch ignored
- Several targets, such as Windows, do not
support nor need PIC, so the PIC directive and switch are ignored.
-
Warning: The switch ”arg1” is not supported by the currently selected target
- Some
compiler switches like $E are not supported by all targets.
-
Warning: Framework-related options are only supported for Darwin/Mac OS X
-
Frameworks are not a known concept, or at least not supported by FPC, on operating
systems other than Darwin/Mac OS X.
-
Error: Illegal minimal floating point constant precision ”arg1”
- Valid minimal precisions
for floating point constants are default, 32 and 64, which mean respectively minimal (usually
32 bit), 32 bit and 64 bit precision.
-
Warning: Overriding name of ”main” procedure multiple times, was previously set to ”arg1”
-
The name for the main entry procedure is specified more than once. Only the last name will
be used.
-
Warning: Illegal identifier ”arg1” for $WARN directive
- Identifier is not known by a
{$WARN} compiler directive.
-
Error: Illegal alignment directive
- The alignment directive is not valid. Either the alignment
type is not known or the alignment value is not a power of two.
-
Fatal: It is not possible to include a file that starts with an UTF-8 BOM in a module that uses a different code page
-
All source code that is part of a single compilation entity (program, library, unit) must be
encoded in the same code page
-
Warning: Directive ”arg1” is ignored for the the current target platform
- Some
directives are ignored for certain targets, such as changing the packrecords and packenum
settings on managed platforms.
-
Warning: Current system codepage ”arg1” is not available for the compiler. Switching default codepage back to ”arg2”.
-
The current system codepage is not known by the compiler. The compiler is compiled with
support for several codepages built-in. The codepage of the operation system is
not in that list. You will need to recompile the compiler with support for this
codepage.
-
Warning: SETPEOPTFLAGS is not supported by the target OS
- The {$SETPEOPTFLAGS}
directive is not supported by the target OS.
-
Error: Illegal argument for SETPEFLAGS
- The given argument for SETPEFLAGS is
neither a correct named value nor an ordinal value
-
Error: Illegal argument for SETPEOPTFLAGS
- The given argument for SETPEOPTFLAGS is
neither a correct named value nor an ordinal value
-
Error: Directive arg1 is not supported on this target
- Not all compiler directives are
supported on all targets.
-
Warning: The specified stack size is not within the valid range for the platform. Setting the stack size ignored.
-
The valid range for the stack size is 1024 - 67107839 on 32-bit and 64-bit platforms and 1024
- 65520 on 16-bit platforms. Additionally, for Turbo Pascal 7 compatibility reasons,
specifying a stack size of 65521 on 16-bit platforms actually sets the stack size to
65520.
-
Warning: The specified HeapMax value is smaller than the HeapMin value. Setting HeapMax ignored.
-
The HeapMax value (if specified) must be greater than or equal to the HeapMin value.
Otherwise, the HeapMax value is ignored.
-
Error: Illegal argument for HUGEPOINTERNORMALIZATION
- The only allowed
values for HUGEPOINTERNORMALIZATION are BORLANDC, MICROSOFTC and
WATCOMC.