Super Prev Next

Compiler messages

This chapter gives explanation for compiler diagnostics. For each error, an error number is provided along with a text of error message and an explanation. An error message can contain a format specifier in the form %d for a number or %s for a string. In this case, an argument (or arguments) is described on the next line.

In most cases the compiler prints a source line in which the error was found. The position of the error in the line is marked with a dollar sign placed directly before the point at which the error occurred.


Super Prev Next

Lexical errors


Super Prev Next

E001

illegal character

All characters within the Modula-2 or Oberon-2 character sets are acceptable. Control characters in the range 0C to 37C are ignored. All other characters, e.g. % are invalid.


Super Prev Next

E002

comment not closed; started at line %d (line number)

This error is reported if a closing comment bracket is omitted for a comment started at the given line.


Super Prev Next

E003

illegal number

This error is reported in the following cases:


Super Prev Next

E004

string literal not closed or too long

This error usually occurs if a closing quote is omitted or does not match the opening quote. Note that a string literal is limited to a single line and its size cannot exceed 256 characters. In Modula-2, string concatenation may be used to build long literal strings.


Super Prev Next

F005

unexpected end of file

Input file ends before end of a module.


Super Prev Next

E006

identifier too long

Length of an identifier exceeds compiler limit (127 characters).


Super Prev Next

F010

source text read error

A read error occurs while reading source text.


Super Prev Next

E012

character constant too large (377C or 0FFX is maximum)

The meaning of this message is obvious.


Super Prev Next

E171

illegal structure of conditional compilation options

This error is reported if a structure of conditional IF statements is broken, e.g. there is no IF for an END, ELSE, or ELSIF clause or there is no END for an IF.


Super Prev Next

E172

conditional compilation option starts with incorrect symbol

IF, ELSIF, ELSE, END or identifier expected.


Super Prev Next

F173

pragma not closed; started at line %d (line number)

This error is reported if a closing bracket "*>" is omitted for a pragma started at the given line.


Super Prev Next

F174

unexpected end of file while skipping; see at %d (line number)

Input file ended while the compiler was skipping source text according to the conditional compilation statement. It may be a result of a missed <* END *> clause. Check the pragma at the given line.


Super Prev Next

E175

invalid pragma syntax

Check the manual for the pragma syntax.


Super Prev Next

Syntax errors


Super Prev Next

E007

identifier expected

The compiler expects an identifier at the indicated position.


Super Prev Next

E008

expected symbol %s (symbol)

The compiler expects the given symbol at the indicated position. The symbol may be one of the following:

     |       ;       :       .       [       ]       :=
     (       )       {       }       ,       =       ..
     DO      END     OF      THEN    TO      UNTIL   IMPORT
     MODULE


Super Prev Next

E081

expected start of factor

The compiler expects start of factor at the indicated position, i.e. an identifier, literal value, aggregate, left parenthesis, etc. See the syntax of the language for more information.


Super Prev Next

E082

expected start of declaration

The compiler expects start of declaration at the indicated position, i.e. one of the keywords: "CONST", "VAR", "TYPE", "PROCEDURE", "BEGIN", or "END".


Super Prev Next

E083

expected start of type

The compiler expects start of a type at the indicated position. See the syntax of the language for more information.


Super Prev Next

E085

expected expression

The compiler expects expression at the indicated position.


Super Prev Next

E086

expected start of statement

The compiler expects start of a statement at the indicated position. See the syntax of the language for more information.


Super Prev Next

Semantic errors


Super Prev Next

E020

undeclared identifier "%s" (name)

The given identifier has no definition in the current scope.


Super Prev Next

E021

type identifier "%s" shall not be used in declaring itself (name)

An identifier being declared as a type shall not be used in declaring that type, unless that type is a new pointer type or a new procedure type. This error will be reported for the following example

    TYPE
      Rec = RECORD
        next: POINTER TO Rec;
      END;

use the following declarations instead:

    TYPE
      Ptr = POINTER TO Rec;
      Rec = RECORD
        next: Ptr;
      END;


Super Prev Next

E022

identifier "%s" was already defined at %s[%d.%d] (name,file name,line,column)


Super Prev Next

E028

identifier "%s" was already defined in other module (name)

An identifier being declared is already known in the current context (the name used has some other meaning). If a file name and text position of previous definition are known, the compiler reports error 022 otherwise 028.


Super Prev Next

E023

procedure with forward declaration cannot be a code procedure

A forward declaration of a procedure is followed by a declaration of a code procedure.


Super Prev Next

E024

recursive import not allowed

A module imports itself. Example:

    MODULE xyz;

    IMPORT xyz;

    END xyz.


Super Prev Next

E025

unsatisfied exported object

An object exported from a local object is not defined there. Example:

    MODULE M; (* local module *)

    EXPORT Foo;

    END M;


Super Prev Next

E026

identifier "%s" is used in its own declaration, see %s[%d.%d]

An identfier cannot be used in its own declaration, like in:

    CONST c = 1;
    PROCEDURE proc;
      CONST c = c + 1;
    END proc;


Super Prev Next

E027

illegal usage of module identifier "%s" (module name)

An identifier denoting module cannot be used at the indicated position.


Super Prev Next

E029

incompatible types: "%s" "%s"(type,type)


Super Prev Next

E030

incompatible types

The compiler reports this error in the following cases:

The compiler reports error 29 if it can display incompatible types and error 30 otherwise.


Super Prev Next

E031

identifier does not denote a type

An identifier denoting a type is expected at the indicated position.


Super Prev Next

E032

scalar type expected

The compiler expects a scalar type (real, integer, cardinal, range, enumeration, CHAR, or BOOLEAN).


Super Prev Next

E033

ordinal type expected

The compiler expects a value, variable, or type designator of ordinal type, i.e. CHAR, BOOLEAN, enumeration, integer, or cardinal type or a subrange of one of those types.


Super Prev Next

E034

invalid combination of parameters in type conversion

According to the language definition this combination of parameters in a call of the standard procedure VAL is not valid.


Super Prev Next

E035

NEW: "%s" not known in this scope (ALLOCATE or DYNALLOCATE)

A call to NEW is treated as a call to ALLOCATE (or DYNALLOCATE for open arrays). The required procedure is not visible in this scope. It must be either imported or implemented.

Note: In XDS, the default memory managemet routines may be enabled by setting the STORAGE option ON.


Super Prev Next

E036

DISPOSE: "%s" not known in this scope (DEALLOCATE or DYNDEALLOCATE)

A call to DISPOSE is treated as a call to DEALLOCATE (or DYNDEALLOCATE for open arrays). The required procedure is not visible in this scope. It must be either imported or implemented.

Note: In xds, the default memory managemet routines may be enabled by setting the STORAGE option ON.


Super Prev Next

E037

procedure "%s" should be a proper procedure (procedure name)

In Modula-2, calls of NEW and DISPOSE are substituted by calls of ALLOCATE and DEALLOCATE (for dynamic arrays by calls of DYNALLOCATE and DYNDEALLOCATE). The error is reported if one of those procedures is declared as a function.


Super Prev Next

E038

illegal number of parameters "%s" (procedure name)

In Modula-2, calls of NEW and DISPOSE are substituted by calls of ALLOCATE and DEALLOCATE (for dynamic arrays by calls of DYNALLOCATE and DYNDEALLOCATE). The error is reported if a number of parameters in the declaration of a substitution procedure is wrong.


Super Prev Next

E039

procedure "%s": %s parameter expected for "%s" (procedure name,"VAR" or "value",parameter name)

In Modula-2, calls of NEW and DISPOSE are substituted by calls of ALLOCATE and DEALLOCATE (for dynamic arrays by calls of DYNALLOCATE and DYNDEALLOCATE). The error is reported if the kind (variable or value) of the given parameter in the declaration of a substitution procedure is wrong.


Super Prev Next

E040

procedure "%s": type of parameter "%s" mismatch

In Modula-2, calls of NEW and DISPOSE are substituted by calls of ALLOCATE and DEALLOCATE (for dynamic arrays by calls of DYNALLOCATE and DYNDEALLOCATE). The error is reported if a type of the given parameter in the declaration of a substitution procedure is wrong.


Super Prev Next

E041

guard or test type is not an extension of variable type

In an Oberon-2 type test (v IS T) or type quard (v(T)), T should be an extension of the static type of v.


Super Prev Next

E043

illegal result type of procedure

A type cannot be a result type of a function procedure (language or implementation restriction).


Super Prev Next

E044

incompatible result types

A result type of a procedure does not match those of a forward definition or definition of an overriden method.


Super Prev Next

E046

illegal usage of open array type

Open arrays (ARRAY OF) usage is restricted to pointer base types, element types of open array types, and formal parameter types.


Super Prev Next

E047

fewer actual than formal parameters

The number of actual parameters in a procedure call is less than the number of formal parameters.


Super Prev Next

E048

more actual than formal parameters

The number of actual parameters in a procedure call is greater than the number of formal parameters.


Super Prev Next

E049

sequence parameter should be of SYSTEM.BYTE or SYSTEM.LOC type

The only valid types of a sequence parameter are SYSTEM.BYTE and SYSTEM.LOC.


Super Prev Next

E050

object is not array


Super Prev Next

E051

object is not record


Super Prev Next

E052

object is not pointer


Super Prev Next

E053

object is not set

The compiler expects an object of the given type at the indicated position.


Super Prev Next

E054

object is not variable

The compiler expects a variable (designator) at the indicated position.


Super Prev Next

E055

object is not procedure: %s (procedure name)

The compiler expects a procedure designator at the indicated position.


Super Prev Next

E057

a call of super method is valid in method redifinition only

A call of a super method (type-bound procedure bound to a base type) is valid only in a redifinition of that method:

    PROCEDURE (p: P) Foo;
    BEGIN
      p.Foo^
    END Foo.


Super Prev Next

E058

type-bound procedure is not defined for the base type

In a call of a super method (type-bound procedure bound to a base type) p.Foo^ either Foo is not defined for a base type of p or there is no base type.


Super Prev Next

E059

object is neither a pointer nor a VAR-parameter record

The Oberon-2 compiler reports this error in the following cases:


Super Prev Next

E060

pointer not bound to record or array type

In Oberon-2, a pointer base type must be an array or record type. For instance, the declaration TYPE P = POINTER TO INTEGER is invalid.


Super Prev Next

E061

dimension too large or negative

The second parameter of the LEN function is either negative or larger than the maximum dimension of the given array.


Super Prev Next

E062

pointer not bound to record

The Oberon-2 compiler reports this error in the following cases:


Super Prev Next

E064

base type of open array aggregate should be a simple type

A base type of an open array aggregate (ARRAY OF T{}) cannot be a record or array type.


Super Prev Next

E065

the record type is from another module

A procedure bound to a record type should be declared in the same module as the record type.


Super Prev Next

E067

receiver type should be exported %s (name of type)

A receiver type for an exported type-bound procedure should also be exported.


Super Prev Next

E068

this type-bound procedure cannot be called from a record

The receiver parameter of this type-bound procedure is of a pointer type, hence it cannot be called from a designator of a record type. Note that if a receiver parameter is of a record type, such type-bound procedure can be called from a designator of a pointer type as well.


Super Prev Next

E069

wrong mode of receiver type

A mode of receiver type in a type-bound procedure redefinition does not match the previous definition.


Super Prev Next

E071

non-Oberon type cannot be used in specific Oberon-2 construct

A (object of) non-Oberon type (imported from a non-Oberon module or declared with direct language specification) cannot be used in specific Oberon-2 constructs (type-bound procedures, type guards, etc).


Super Prev Next

E072

illegal order of redefinition of type-bound procedures

A type-bound procedure for an extended type is defined before a type-bound procedure with the same name for a base type.


Super Prev Next

E074

redefined type-bound procedure should be exported

A redefined type-bound procedure should be exported if both its receiver type and redefining procedure are exported.


Super Prev Next

E075

function procedure without RETURN statement

A function procedure has no RETURN statement and so cannot return a result.


Super Prev Next

E076

value is required

The compiler expects an expression at the indicated position.


Super Prev Next

E078

SIZE (TSIZE) cannot be applied to an open array

Standard functions SIZE and TSIZE cannot be used to evaluate size of an open array designator or type in the standard mode. If language extensions are enabled, the compiler allows to apply SIZE to an open array designator, but not type.


Super Prev Next

E087

expression should be constant

The compiler cannot evaluate this expression at compile time. It should be constant according to the language definition.


Super Prev Next

E088

identifier does not match block name

An identifier at the end of a procedure or module does not match the one in the procedure or module header. The error may occur as a result of incorrect pairing of ENDs with headers.


Super Prev Next

E089

procedure not implemented "%s"

An exported procedure or forward procedure is not declared. This error often occurs due to comment misplacement.


Super Prev Next

E090

proper procedure is expected

A function is called as a proper procedure. It must be called in an expression. A function result can be ignored for procedures defined as "C", "Pascal", "StdCall" or "SysCall" only. See Direct language specification.


Super Prev Next

E091

call of proper procedure in expression

A proper procedure is called in an expression.


Super Prev Next

E092

code procedure is not allowed in definition module


Super Prev Next

E093

not allowed in definition module

The error is reported for a language feature that can not be used in definition module, including:


Super Prev Next

E094

allowed only in definition module

The error is reported for a language feature that can be used in definition module only, i.e. read-only variables and record fields (extended Modula-2).


Super Prev Next

E095

allowed only in global scope

The error is reported for a language feature that can be used only in the global module scope, including:


Super Prev Next

E096

unsatisfied opaque type "%s"

An opaque type declared in a definition module must be elaborated in the implementation module.


Super Prev Next

E097

unsatisfied forward type "%s"

A type T can be introduced in a declaration of a pointer type as in:

    TYPE Foo = POINTER TO T;

This type T must then be declared at the same scope.


Super Prev Next

E098

allowed only for value parameter

The error is reported for a language feature that can be applied to value parameter only (not to VAR parameters), such as a read-only parameter mark.


Super Prev Next

E099

RETURN allowed only in procedure body

In Oberon-2, the RETURN statement is not allowed in a module body.


Super Prev Next

E100

illegal order of declarations

In Oberon-2. all constants, types and variables in one declaration sequence must be declared before any procedure declaration.


Super Prev Next

E102

language extension is not allowed %s (specification)

The error is reported for a language feature that can be used only if language extensions are switched on. See options M2EXTENSIONS and O2EXTENSIONS.


Super Prev Next

E107

shall not have a value less than 0

The error reported if a value of a (constant) expression cannot be negative, including:


Super Prev Next

E109

forward type cannot be opaque

A forward type T (declared as TYPE Foo = POINTER TO T) cannot be elaborated as an opaque type, i.e. declared as TYPE T = <opaque type>).


Super Prev Next

E110

illegal length, %d was expected (expected number of elements)

Wrong number of elements in an array constructor.


Super Prev Next

E111

repetition counter must be an expression of a whole number type

A repetition counter in an array constructor must be of a whole number type.


Super Prev Next

E112

expression for field "%s" was expected (field name)

The error is reported if a record constructor does not contain an expression for the given field.


Super Prev Next

E113

no variant is associated with the value of the expression

The error is reported if a record constructor for a record type with variant part does not have a variant for the given value of a record tag and the ELSE clause is omitted.


Super Prev Next

E114

cannot declare type-bound procedure: "%s" is declared as a field

A type-bound procedure has the same name as a field already declared in that type or one of its base types.


Super Prev Next

E116

field "%s" is not exported (field name)

The given field is not exported, put export mark into the declaration of the record type.


Super Prev Next

E118

base type is not allowed for non-Oberon record

A record type can be defined as an extension of another type, only if it is an Oberon-2 record type.


Super Prev Next

E119

variant fields are not allowed in Oberon record

A record with variant parts cannot be declared as an Oberon-2 record.


Super Prev Next

E120

field of Oberon type is not allowed in non-Oberon record

This is considered an error because garbage collector does not trace non-Oberon records and reference to an object may be lost.


Super Prev Next

E121

illegal use of type designator "%s"

A type designator cannot be used in a statement position.


Super Prev Next

E122

expression out of bounds

A value which can be checked at compile-time is out of range.


Super Prev Next

E123

designator is read-only

A designator marked as read-only cannot be used in a position where its value may be changed.


Super Prev Next

E124

low bound greater than high bound

A lower bound of a range is greater than high bound.


Super Prev Next

E125

EXIT not within LOOP statement

An EXIT statement specifies termination of the enclosing LOOP statement. This EXIT is not within any LOOP.


Super Prev Next

E126

case label defined more then once

In a CASE statement all labels must have different values. The label at the indicated position is alfeady used in this CASE statement.


Super Prev Next

E128

FOR-loop control variable must be declared in the local scope

A control variable of a FOR loop must be declared locally in the procedure or module which body contains the loop.


Super Prev Next

E129

more expressions than fields in a record type

In a record constructor there are more expressions than there are fields in the record type (or in this variant of a variant record type).


Super Prev Next

E131

zero step in FOR statement

In a FOR statement, the step cannot be equal to zero.


Super Prev Next

E132

shall be an open array designator

If language extensions are OFF, the standard procedure HIGH can be applied to open arrays only, otherwise to any array designator.


Super Prev Next

E133

implementation limit exceeded for set base type (length > %d)

The compiler restricts length of a base type of set (MAX(base)-MIN(base)+1). Note, that the limit does not depend on the low bound, so the following set types are valid:

    SET OF [-256..-5]
    SET OF [MAX(INTEGER)-512..MAX(INTEGER)]


Super Prev Next

E134

must be value of unsigned type

The compiler expects a parameter of this standard procedure to be a value of an unsigned type.


Super Prev Next

E135

must be value of pointer type

The compiler expects a parameter of this standard procedure to be a value of a pointer type. Note: the SYSTEM.ADDRESS type is defined as POINTER TO LOC.


Super Prev Next

E136

must be type designator

The compiler expects a parameter of this standard procedure to be a type designator.


Super Prev Next

E137

numeric constant does not have a defined storage size

The compiler must know the size of a value in the given context. A numeric constant cannot be used at the indicated position.


Super Prev Next

E139

must be (qualified) identifier which denotes variable

The ISO standard requires an "entire designator" in this context, e.g. as a parameter of the SIZE function. It may be either a variable (which may be a formal parameter) or a field of a record variable within a WITH statement that applies to that variable.


Super Prev Next

E140

interrupt procedures are not implemented yet

Oberon compilers from ETH implements so-called interrupt procedures, marked by the symbol "+".

    PROCEDURE + Foo;

In XDS, this feature is not implemented.


Super Prev Next

E141

opaque type can not be defined as Oberon pointer

A Modula-2 opaque type cannot be elaborated as an Oberon-2 pointer. See Chapter Multilanguage programming.


Super Prev Next

E143

not allowed in Oberon

The compiler reports this error for language features that are vaild in Modula-2 but not in Oberon-2, including:


Super Prev Next

E144

pointer and record types are mixed in type test

In an Oberon-2 type test v IS T or a type guard v(T), both v and T must be either pointers or records.


Super Prev Next

E145

control variable must not be a formal parameter

According to ISO Modula-2, a control variable in a FOR statement cannot be a formal parameter (either VAR or value).


Super Prev Next

E146

control variable cannot be exported

A variable used as a control variable in a FOR statement or an Oberon-2 WITH statement cannot be exported.


Super Prev Next

E147

control variable cannot be threatened

A control variable of a FOR statement or an Oberon-2 WITH statement has been threatened inside the body of the statement, or in a nested procedure called from the body. Threatening actions include assignment and passing as a VAR parameter to a user-defined or standard procedure (ADR, INC, DEC, etc). The compiler also reports the error 158 to indicate the exact place of threatening.


Super Prev Next

E148

finalization is allowed only in module block

A procedure body can not contain a finalization part.


Super Prev Next

E149

RETRY is allowed only in exceptional part of block

This RETRY statement is outside an exceptional part of a block.


Super Prev Next

E150

wrong value of direct language specification

A value must be either one of the strings ("Modula", "Oberon", "C","Pascal", "SysCall", or "StdCall") or the corresponding integer value. We recommend to use strings, integer values are preserved for backward compatibility.


Super Prev Next

E151

must be of integer type

The compiler expects a variable of an integer type.


Super Prev Next

E152

incompatible calling conventions: "%s" "%s"


Super Prev Next

E153

incompatible calling conventions

Two procedure types have different calling conventions. The error can reported in the following cases:

The compiler reports error 152 if it can show incompatible types and error 153 otherwise.


Super Prev Next

E154

procedure "%s" does not match previous definition: was: %s now: %s (procedure name,proctype,proctype)


Super Prev Next

E155

procedure "%s" does not match previous definition (procedure name)

A procedure heading must have the same number of parameters, the same parameter modes (variable or value) and the same types as in the previous declaration. A previous declaration may be one of the following:

The compiler reports error 154 if it can show incompatible types and error 155 otherwise.


Super Prev Next

E156

procedure designator is expected

A designator which appears to be called (e.g. Foo(...)) does not denote a procedure.


Super Prev Next

E158

control variable "%s" is threatened here (variable name)

A control variable of a FOR statement or an Oberon-2WITH statement is threatened at the indicated position. It means that its value may be changed. See also error 147.


Super Prev Next

E159

type of aggregate is not set or array or record

An object which appears to be an aggregate (e.g. Foo{...}) begins with an identifier which is not a set, record, or array type.


Super Prev Next

E160

invalid parameter specification: expected NIL

Only one special kind of variable parameter is implemented: VAR [NIL]. It means that NIL may be passed to this parameter.


Super Prev Next

E161

VAR [NIL] parameter expected

A parameter of the SYSTEM.VALID function must be a VAR [NIL] parameter.


Super Prev Next

E162

%s value should be in %{} (not "%s") (equation,set of valid values,new value)

This error is reported for a wrong setting of ALIGNMENT, ENUMSIZE, or SETSIZE equation.


Super Prev Next

E163

control variable cannot not be volatile

A control variable of a FOR statement cannot be marked as volatile. See the ??? option.


Super Prev Next

E200

not yet implemented

This language feature is not implemented yet.


Super Prev Next

E201

real overflow or underflow in constant expression

This error is to be reported if a real overflow (underflow) occurs during evaluation of a constant expression.


Super Prev Next

E202

integer overflow in constant expression

The compiler uses 64-bits (signed) arithmetics for whole numbers. The error is reported if an overflow occurs during evaluation of a constant expression. In the following example, an error will be reported for the assignment statement, while constant definition is valid.

    MODULE Test;

    CONST
      VeryBigConstant = MAX(CARDINAL)*2;            (* OK *)
      TooBigConstant = VeryBigConstant*VeryBigConstant;   (* OK *)

    END Test.


Super Prev Next

E203

division by zero

The second operand of a DIV, MOD, REM, or "/" operator is zero.


Super Prev Next

E206

array length is too large or less then zero

The array length is either negative or exceeds implementation limit.


Super Prev Next

E208

CASE statement always fails

The error is reported if a case select expression can be evaluated at compile-time and there is no variant corresponding to its value, and the ELSE clause is omitted. If not constantly evaluated, this CASE statement would cause the caseSelectException exception at run-time.


Super Prev Next

E219

too many nested open array types (implementation limit %d) (implementation limit)

The compiler (more precisely, run-time support) puts a limit on the number of nested open array types (or dimensions). Note, that there is no limit for arrays with specified length, because such arrays do not require special support in run-time system.


Super Prev Next

E220

heirarchy of record extensions too high (implementation limit %d) (implementation limit)

The run-time system puts a limit on the level of record extensions. It is required for efficient implementaion of type tests and type guards.


Super Prev Next

E221

procedure declaration nesting limit (%d) has been exceeded (implementation limit)

The compiler puts a limit on the number of procedures nested inside each other. When modules are nested inside procedures, only the level of procedure declarations is counted.


Super Prev Next

E281

type-bound procedure is not valid as procedure value

A type-bound procedure cannot be assigned to a variable of procedure type.


Super Prev Next

E282

local procedure is not valid as procedure value "%s" (procedure name)

A procedure local to another one cannot be assigned to a variable of procedure type.


Super Prev Next

E283

code (or external) procedure is not valid as procedure value

A code procedure and external procedure cannot be assigned to a variable of procedure type.


Super Prev Next

Symbol files read/write errors


Super Prev Next

F190

incorrect header in symbol file "%s" (module name)

A symbol file for the given module is corrupted. Recompile it.


Super Prev Next

F191

incorrect version of symbol file "%s" (%d instead of %d) (module name, symfile version, current version)

The given symbol file is generated by a different version of the compiler. Recompile the respecitve source or use compatible versions of the compiler and/or symbol file.


Super Prev Next

F192

key inconsistency of imported module "%s" (module name)

The error occurs if an interface of some module is changed but not all its clients (modules that imports from it) were recompiled. For example, let A imports from B and M; B in turn imports from M:

DEFINITION MODULE M;   DEFINITION MODULE B;     MODULE A;
                       IMPORT M;                IMPORT M,B;
END M.                 END B.                   END A.

Let us recompile M.def, B.def and then M.def again. The error will be reported when compiling A.mod, because version keys of module M imported through B is not equal to the version key of M imported directly.

To fix the problem modules must be compiled in appropriate order. We recommend to use the XDS compiler make facility, i.e. to compile your program in the MAKE or PROJECT operation mode. If you always use the make facility this error will never be reported.


Super Prev Next

F193

generation of new symbol file not allowed

The Oberon-2 compiler creates a temporary symbol file every time a module is compiled, compares that symbol file with the existing one and overwrites it with the new one if necessary. When the CHANGESYM option is OFF (by default), the compiler reports an error if the symbol file (and hence the module interface) had been changed and does not replace the old symbol file.

Note: if the M2CMPSYM option is set ON, the same applies to compilation of a Modula-2 definition module, i.e., the CHANGESYM option should be set if the module interface has been changed.


Super Prev Next

F194

module name does not match symbol file name "%s" (module name)

A module name used in an IMPORT clause must be equal to the actual name of the module, written in the module heading.


Super Prev Next

F195

cannot read symbol file "%s" generated by %s (module name, compiler name)

The symbol file for the given module is generated by another XDS compiler. Native code compilers can read symbol files generated by XDS-C on the same platform, but not vice versa.


Super Prev Next

Internal errors

This section lists internal compiler errors. In some cases such a error may occur as a result of inadequate recovery from previous errors in your source text. In any case we recommend to provide us with a bug report, including:


Super Prev Next

F103

INTERNAL ERROR(ME): value expected


Super Prev Next

F104

INTERNAL ERROR(ME): designator expected


Super Prev Next

F105

INTERNAL ERROR(ME): statement expected


Super Prev Next

F106

INTERNAL ERROR(ME): node type = NIL


Super Prev Next

F142

INTERNAL ERROR(ME): can not generate code


Super Prev Next

F196

INTERNAL ERROR: incorrect sym ident %d while reading symbol file "%s"


Super Prev Next

F197

INTERNAL ASSERT(%d) while reading symbol file "%s"


Super Prev Next

Warnings

In many cases a warning may help you to find a bug or a serious drawback in your source text. We recommend not to switch warnings off and carefully check all of them. In many cases warnings have helped us to find and fix bugs very quickly (note that XDS compilers are written in XDS Oberon-2 and Modula-2).

Warnings described in this section are reported by both XDS-C and Native XDS. Each of these products may report additional warnings. Native XDS compilers fulfil more accurate analysis of the source code and report more warnings.


Super Prev Next

W300

variable declared but never used

This variable is of no use, it is not exported, assigned, passed as a parameter, or used in an expression. The compiler will not allocate space for it.


Super Prev Next

W301

parameter is never used

This parameter is not used in the procedure.


Super Prev Next

W302

value was assigned but never used

The current version of the compiler does not report this warning.


Super Prev Next

W303

procedure declared but never used

This procedure is not exported, called or assigned. The compiler will not generate it.


Super Prev Next

W304

possibly used before definition "%s" (variable name)

This warning is reported if a value of the variable may be undefined at the indicated position. Note, that it is just a warning. The compiler may be mistaken in complex contexts. In the following example, "y" will be assigned at the first iteration, however, the compiler will report a warning, because it does not trace execution of the FOR statement.

    PROCEDURE Foo;
      VAR x,y: INTEGER;
    BEGIN
      FOR x:=0 TO 2 DO
        IF x = 0 THEN y:=1
        ELSE INC(y)  (* warning is reported here *)
        END;
      END;
    END Foo;

This warning is not reported for global variables.


Super Prev Next

W305

constant declared but never used

The current version of the compiler does not report this warning.


Super Prev Next

W310

infinite loop

Execution of this loop (LOOP, WHILE or REPEAT) will not terminate normally. It means that statements after the loop will never be executed and the compiler will not generate them. Check that the loop was intentionally made infinite.


Super Prev Next

W311

unreachable code

This code cannot be executed and the compiler will not generate it (dead code elimination). It may be statements after a RETURN, ASSERT(FALSE), HALT, infinite loop, statements under constant FALSE condition (IF FALSE THEN), etc.


Super Prev Next

W312

loop is executed exactly once

It may be a loop like

    FOR i:=1 TO 1 DO ... END;

or

    LOOP ...; EXIT END;

Check that you wrote it intentionally.


Super Prev Next

W314

variable "%s" has compile time defined value here

The compiler was able to determine the run-time value of the given variable (due to constant propagation) and will use it instead of accessing the variable. For the following example

    i:=5; IF i = 5 THEN S END;

the compiler will generate:

    i:=5; S;

This warning is not reported for global variables.


Super Prev Next

W315

NIL dereference

The compiler knows that a value of a pointer variable is NIL (due to constant propagation), e.g:

    p:=NIL;
    p^.field:=1;

The code will be generated and will cause "invalidLocation" exception at run-time.

This warning is not reported for global variables.


Super Prev Next

W316

this SYSTEM procedure is not described in Modula-2 ISO standard

This warning is reported in order to simplify porting your program to other Modula-2 compilers.


Super Prev Next

W317

VAR parameter is used here, check that it is not threatened inside WITH

A variable parameter of a pointer type is used as a control variable in an Oberon-2 WITH statement. The compiler cannot check that it is not changed inside WITH. In the the following example "ptr" and, hence, "p" becomes NIL inside WITH:

    VAR ptr: P;

    PROCEDURE proc(VAR p: P);
    BEGIN
      WITH p: P1 DO
        ptr:=NIL;
        p.i:=1;
      END;
    END proc;

    BEGIN
      proc(ptr);
    END

We recommend to avoid using variable parameters of pointer types in WITH statements.


Super Prev Next

W318

redundant FOR statement

The FOR statement is redundant (and not generated) if its low and high bounds can be evaluted at compile-time and it would be executed zero times, or if its body is empty.


Super Prev Next

Pragma warnings


Super Prev Next

W320

undeclared option "%s"

An undeclared option is used. Its value is assumed to be FALSE.


Super Prev Next

W322

undeclared equation "%s"

An undeclared equation is used. Its value is undefined.


Super Prev Next

W321

option "%s" is already defined


Super Prev Next

W323

equation "%s" is already defined

The option (equation) is already defined, second declaration is ignored.


Super Prev Next

W390

obsolete pragma setting

The syntax used is obsolete. The next release of the compiler will not understand it. We recommend to rewrite the clause using the new syntax.


Super Prev Next

Native XDS warnings


Super Prev Next

W900

redundant code eliminated

This warning is reported if a program fragment does not influence to the program execution, e.g:

    i:=1;
    i:=2;

The first assignemnt is redundant and will be deleted.


Super Prev Next

W901

redundant code not eliminated - can raise exception

The same as W900, but the redundant code is preserved because it can raise an exception, e.g.:

    i:=a DIV b; (* raises exception if b <= 0 *)
    i:=2;


Super Prev Next

W902

constant condition eliminated

The warning is reported if a boolean condition can be evaluated at run-time, e.g.

    IF (i=1) & (i=1) THEN (* the second condition is TRUE *)

or

    j:=2;
    IF (i=1) OR (j#2) THEN (* the second condition is FALSE *)


Super Prev Next

W903

function result is not used

The compiler ignores function result, like in:

    IF Foo() THEN END;


Super Prev Next

W910

realValueException will be raised here


Super Prev Next

W911

wholeValueException will be raised here


Super Prev Next

W912

wholeDivException will be raised here


Super Prev Next

W913

indexException will be raised here


Super Prev Next

W914

rangeException will be raised here


Super Prev Next

W915

invalidLocation exception will be raised here

A warning from this group is reported if the compiler determines that the exception will be raised in the code corresponding to this program fragment. In this case the fragment is omitted and the compiler generates a call of a run-time procedure which will raise this exception.


Super Prev Next

XDS-C errors

This section describes errors reported by the C code generator (back-end). The code generator is invoked only if no errors are found by the language parser.


Super Prev Next

E1001

parameter "%s" is not declared (parameter name)

An unknown parameter name is used in a protocol string of a code procedure.


Super Prev Next

E1002

can not generate recursive type definition


Super Prev Next

E1018

can not generate recursive type declaration

In C, a recursive type definition must contain a struct, while in Modula-2/Oberon-2 this is done via forward declaration of a pointer type. The following types cannot be generated in C:

    TYPE P = POINTER TO P;

or

    TYPE P = POINTER TO A;
         A = ARRAY [0..1] OF P;

We feel that such types are of very low importance in real programs.


Super Prev Next

E1003

external names conflict: "%s.%s" and "%s.%s"

The compiler forms an external name (name of exported object) in the form <module name>_<object name>. The error is reported if external names of two distinct objects are equal.


Super Prev Next

E1004

external name "%s.%s" conflict with standard name (xm.kwd)

The same as previous error, an external name is equal to a name defined in the xm.kwd file.


Super Prev Next

E1005

unimplemented system procedure

This standard (system) procedure is not implemented yet.


Super Prev Next

E1006

undefined array length for dimension %d

The LEN function cannot be applied to an open array parameter of a procedure with the following calling conventions: "C", "SysCall", "StdCall". In the case of a "normal" (Oberon-2/Modula-2) procedure the compiler passes an additional parameter for each dimension (length in this dimension). For "C", "SysCall", "StdCall" procedures only an address of an array is passed.


Super Prev Next

E1007

undefined array size for dimension %d

The compiler cannot evaluate the array size.


Super Prev Next

E1014

can not get size of (%s) (type)

The error is reported if the compiler cannot evaluate size of this type. See also the GENSIZE option.


Super Prev Next

E1015

too many parameters

The implementation puts a limit on the number of parameters of a generated procedure (256). Note, that a source procedure may have less parameters, because additional parameters are passed for:


Super Prev Next

E1008

can not generate expression


Super Prev Next

E1009

can not generate l-value type cast


Super Prev Next

E1010

can not generate type conversion


Super Prev Next

E1011

can not generate aggregate


Super Prev Next

E1012

can not generate statement


Super Prev Next

E1013

cannot generate constant aggregate of this type


Super Prev Next

E1016

can not generate type designator


Super Prev Next

E1017

can not generate type declaration


Super Prev Next

E1019

can not generate object declaration

An error of this group usually means that some rare language feature (or combination) is not implemented yet. Please provide us with a bug report containing a miminal test case.