This section lists all the messages that concern the handling of symbols. This means all things that have to do with procedure and variable names.
The compiler doesn’t know this symbol. Usually happens when you misspell the name
of a variable or procedure, or when you forget to declare a variable.
An internal error occurred in the compiler; If you encounter such an error, please
contact the developers and try to provide an exact description of the circumstances in
which the error occurs.
The identifier was already declared in the current scope.
The identifier was already declared in a previous scope.
The identifier encountered has not been declared, or is used outside the scope where it
is defined.
This can happen in two cases:
You declare a function in the interface part, or with a forward directive, but do not implement it.
You reference a type which isn’t declared in the current type block.
There is an error in your definition of a new array type. One of the range delimiters in an
array declaration is erroneous. For example, Array [1..1.25] will trigger this
error.
A symbol was forward defined, but no declaration was encountered.
A static method of an object can only access static variables.
The variable or expression isn’t of the type record or object or class.
You are trying to generate an instance of a class which has an abstract method that wasn’t
overridden.
A label was declared, but not defined.
A label was declared and used, but not defined.
This error should never happen; it occurs if a label is defined outside a procedure or
function.
You must use the -Sg switch to compile a program which has labels and goto statements.
By default, label and goto are not supported.
A goto label was encountered, but the label wasn’t declared.
The identifier specified after the goto isn’t of type label.
You are defining a label twice. You can define a label only once.
The declaration of a set contains an invalid type definition.
You declared a class, but you did not implement it.
The unit referenced in the uses clause is not used.
The identifier was declared (locally or globally) but was not used (locally or globally).
You have declared, but not used, a variable in a procedure or function implementation.
The identifier was declared (locally or globally) and assigned to, but is not used (locally or
globally) after the assignment.
The variable in a procedure or function implementation is declared and assigned to, but is
not used after the assignment.
A local symbol is never used.
The indicated private field is defined, but is never used in the code.
The indicated private field is declared and assigned to, but never read.
The indicated private method is declared but is never used in the code.
The variable or expression is not of type set. This happens in an in statement.
You can get this warning if the compiler thinks that a function return value is not set. This
will not be displayed for assembler procedures, or procedures that contain assembler
blocks.
Arrays with sizes not multiples of 4 will be wrongly aligned for C structures.
The field doesn’t exist in the record/object definition.
This message is displayed if the compiler thinks that a variable will be used (i.e. it appears in
the right-hand side of an expression) when it was not initialized first (i.e. appeared in the
left-hand side of an assignment).
This message is displayed if the compiler thinks that a variable will be used (i.e. it appears in
the right-hand side of an expression) when it was not initialized first (i.e. appeared in the
left-hand side of an assignment).
This error is generated when an identifier of a record, field or method is accessed while it is
not defined.
You get this when you use the -vh switch.In the case of an overloaded procedure not being
found. Then all candidate overloaded procedures are listed, with their parameter
lists.
You get this when you declare a data element whose size exceeds the prescribed limit (2 Gb
on 80386+/68020+ processors).
There was no matching method found which could implement the interface method. Check
argument types and result type of the methods.
This means that a symbol (a variable, routine, etc...) which is declared as deprecated is
used. Deprecated symbols may no longer be available in newer versions of the unit / library.
Use of this symbol should be avoided as much as possible.
This means that a symbol (a variable, routine, etc...) which is declared as platform is used.
This symbol’s value, use and availability is platform specific and should not be used if the
source code must be portable.
This means that a symbol (a variable, routine, etc...) which is declared as unimplemented
is used. This symbol is defined, but is not yet implemented on this specific platform.
Only simple types like ordinal, float and string types are supported when redefining a type
with type newtype = type oldtype;.
This message is displayed if the compiler thinks that a variable will be used (i.e. it appears in
the right-hand side of an expression) when it was not initialized first (i.e. it did not appear in
the left-hand side of an assignment).
This message is displayed if the compiler thinks that a variable will be used (i.e. it appears in
the right-hand side of an expression) when it was not initialized first (i.e. t did not appear in
the left-hand side of an assignment).
This message is displayed if the compiler thinks that the function result variable will be used
(i.e. it appears in the right-hand side of an expression) before it is initialized (i.e. before it
appeared in the left-hand side of an assignment).
This message is displayed if the compiler thinks that the function result variable will be used
(i.e. it appears in the right-hand side of an expression) before it is initialized (i.e. it appears
in the left-hand side of an assignment)
You have read the value of a variable, but nowhere assigned a value to it.
When getting a warning about constructing a class/object with abstract methods you get
this hint to assist you in finding the affected method.
This means that a symbol (a variable, routine, etc...) which is declared as experimental is
used. Experimental symbols might disappear or change semantics in future versions. Usage of
this symbol should be avoided as much as possible.
This happens if you declare a function in the interface of a unit in macpas mode, but do
not implement it.
This means that a symbol (a variable, routine, etc...) which is declared as library is used.
Library symbols may not be available in other libraries.
This means that a symbol (a variable, routine, etc...) which is declared as deprecated is
used. Deprecated symbols may no longer be available in newer versions of the unit / library.
Use of this symbol should be avoided as much as possible.
This means that compiler cannot find an appropriate enumerator to use in the for-in loop. To
create an enumerator you need to define an operator enumerator or add a public or published
GetEnumerator method to the class or object definition.
This means that compiler cannot find a public MoveNext method with the Boolean return
type in the enumerator class or object definition.
This means that compiler cannot find a public Current property in the enumerator class or
object definition.
In Objective-C, a message name automatically contains as many colons as parameters. In
order to prevent mistakes when specifying the message name in FPC, the compiler checks
whether this is also the case here. Note that in case of messages taking a variable number of
arguments translated to FPC via an array of const parameter, this final array
of const parameter is not counted. Neither are the hidden self and _cmd
parameters.
The indicated private type is declared but is never used in the code.
The indicated private const is declared but is never used in the code.
The indicated private property is declared but is never used in the code.
This means that a unit which is declared as deprecated is used. Deprecated units may no
longer be available in newer versions of the library. Use of this unit should be avoided as
much as possible.
This means that a unit which is declared as deprecated is used. Deprecated units may no
longer be available in newer versions of the library. Use of this unit should be avoided as
much as possible.
This means that a unit which is declared as platform is used. This unit use and
availability is platform specific and should not be used if the source code must be
portable.
This means that a unit which is declared as library is used. Library units may not be
available in other libraries.
This means that a unit which is declared as unimplemented is used. This unit is defined,
but is not yet implemented on this specific platform.
This means that a unit which is declared as experimental is used. Experimental units
might disappear or change semantics in future versions. Usage of this unit should be avoided
as much as possible.
Objecive-C and Java classes can be imported formally, without using the unit in which it is
fully declared. This enables making forward references to such classes and breaking circular
dependencies amongst units. However, as soon as you wish to actually do something with an
entity of this class type (such as access one of its fields, send a message to it, or use
it to inherit from), the compiler requires the full definition of the class to be in
scope.
Gotos into initialization or finalization blockse of units are not allowed.
When a class is declared using a formal external definition, the actual external definition (if
any) must specify the same external name as the formal definition (since both definitions
refer to the same actual class type).
Some OS do not have library specific namespaces, for those OS, the function declared as
”external ’libname’ name ’funcname’”, the ’libname’ part is only a hint, funcname might also
be loaded by another library. This warning appears if ’funcname’ is used twice with two
different library names.
Java does not automatically add inherited constructors to child classes, so that they can be
hidden. However, if a class does not explicitly declare at least one constructor, the compiler is
required to add a public, parameterless constructor. In Java, constructors are
nameless, but in FPC they are all called “Create”. Therefore, if you do not add a
constructor to a Java class and furthermore use the “Create” identifier for another
entity (e.g., a field, or a parameterless method), the compiler cannot satisfy this
requirement.
Java does not automatically add inherited constructors to child classes, so that they can be
hidden. However, if a class does not explicitly declare at least one constructor, the compiler is
required to add a public, parameterless constructor. This compiler must then call the
parameterless constructor from the parent class inside this added constructor. This is
however impossible if the parent class does not declare such a constructor. In this case you
must add a valid constructor yourself.
A helper for the mentioned type is added to the current scope
This message shows all overloaded declarations in case of an error.
This message is displayed if the compiler thinks that a variable will be used (i.e. it appears in
the right-hand side of an expression) when it was not initialized first (i.e. appeared in the
left-hand side of an assignment). Since the variable is managed, i. e. implicitly initialized by
the compiler, this might be intended behaviour and does not necessarily mean that the code
is wrong.
This message is displayed if the compiler thinks that a variable will be used (i.e. it appears in
the right-hand side of an expression) when it was not initialized first (i.e. appeared in the
left-hand side of an assignment). Since the variable is managed, i. e. implicitly initialized by
the compiler, this might be intended behaviour and does not necessarily mean that the code
is wrong.
This message is displayed if the compiler thinks that a variable will be used (i.e. it appears in
the right-hand side of an expression) when it was not initialized first (i.e. it did not appear in
the left-hand side of an assignment). Since the variable is managed, i. e. implicitly initialized
by the compiler, this might be intended behaviour and does not necessarily mean that the
code is wrong.
This message is displayed if the compiler thinks that a variable will be used (i.e. it appears in
the right-hand side of an expression) when it was not initialized first (i.e. t did not appear in
the left-hand side of an assignment). Since the variable is managed, i. e. implicitly initialized
by the compiler, this might be intended behaviour and does not necessarily mean that the
code is wrong.
This message is displayed if the compiler thinks that the function result variable will be used
(i.e. it appears in the right-hand side of an expression) before it is initialized (i.e. before it
appeared in the left-hand side of an assignment). Since the variable is managed, i. e.
implicitly initialized by the compiler, this might be intended behaviour and does not
necessarily mean that the code is wrong.
This message is displayed if the compiler thinks that the function result variable will be used
(i.e. it appears in the right-hand side of an expression) before it is initialized (i.e. it appears
in the left-hand side of an assignment). Since the variable is managed, i. e. implicitly
initialized by the compiler, this might be intended behaviour and does not necessarily mean
that the code is wrong.
The identifier was already declared in an Objective-C category that’s in the same scope as
the current identifier. This is a warning instead of an error, because while this
hides the identifier from the category, there are often many unused categories in
scope.
The specified generic type parameter for the generic class, record or routine does
not match with the one declared in the declaration of the generic class, record or
routine.
Shows what the generic type parameter was originally declared as if a mismatch is found
between a declaration and the definition.
The variable or expression isn’t of the type record or object.