-

Difference between revisions of "Error Messages"

From HI-TECH C for CP/M Fan WIKI(EN)
Jump to: navigation, search
 
Line 4: Line 4:
 
causes the message or what to do about it.
 
causes the message or what to do about it.
  
 
+
== . ==
  
 
;'.' expected after '..' P1
 
;'.' expected after '..' P1
 
:The ellipsis symbol must have three dots
 
:The ellipsis symbol must have three dots
 +
 +
== A ==
  
 
;actuals too long CPP
 
;actuals too long CPP
Line 29: Line 31:
 
;attempt to modify const object P1
 
;attempt to modify const object P1
 
:An attempt has been made to assign to or otherwise modify an object designated as 'const'
 
:An attempt has been made to assign to or otherwise modify an object designated as 'const'
 +
 +
== B ==
  
 
;bad bitfield type P1
 
;bad bitfield type P1
Line 86: Line 90:
 
;Bit field too large (n bits) CGEN
 
;Bit field too large (n bits) CGEN
 
:A bit field may not be larger than an int
 
:A bit field may not be larger than an int
 +
 +
== C ==
  
 
;Cannot get memory LINK
 
;Cannot get memory LINK
Line 186: Line 192:
 
;constant operand to || or && CGEN
 
;constant operand to || or && CGEN
 
:A logical operator has a constant operand which has been optimized out
 
:A logical operator has a constant operand which has been optimized out
 +
 +
== D ==
  
 
;declarator too complex P1
 
;declarator too complex P1
Line 219: Line 227:
 
;duplicate qualifier P1
 
;duplicate qualifier P1
 
:The same qualifier appears more than once in this type specifier
 
:The same qualifier appears more than once in this type specifier
 +
 +
== E ==
  
 
;entry point multiply defined LINK
 
;entry point multiply defined LINK
Line 252: Line 262:
 
;expression too complex P1
 
;expression too complex P1
 
:The expression has too many nested parantheses or other nested constructs
 
:The expression has too many nested parantheses or other nested constructs
 +
 +
== F ==
  
 
;Fixup overflow referencing LINK
 
;Fixup overflow referencing LINK
Line 273: Line 285:
 
;functions can't return functions P1
 
;functions can't return functions P1
 
:A function cannot return a function - it can return a pointer to function
 
:A function cannot return a function - it can return a pointer to function
 +
 +
== H ==
  
 
;hex digit expected P1
 
;hex digit expected P1
 
:A hex digit is expected after '0x'
 
:A hex digit is expected after '0x'
 +
 +
== I ==
  
 
;identifier is a structure tag P1
 
;identifier is a structure tag P1
Line 383: Line 399:
 
;integral type required P1
 
;integral type required P1
 
:An integral type is required here
 
:An integral type is required here
 +
 +
== L ==
  
 
;large offset CGEN
 
;large offset CGEN
Line 398: Line 416:
 
;lvalue required P1
 
;lvalue required P1
 
:An lvalue, i.e. something which can be assigned to, is required after an '&' or on the left hand of an assignment
 
:An lvalue, i.e. something which can be assigned to, is required after an '&' or on the left hand of an assignment
 +
 +
== M ==
  
 
;macro recursion CPP
 
;macro recursion CPP
Line 428: Line 448:
 
;multiply defined symbol LINK
 
;multiply defined symbol LINK
 
:A symbol is defined more than once
 
:A symbol is defined more than once
 +
 +
== N ==
  
 
;name is a union, struct or enum P1
 
;name is a union, struct or enum P1
Line 461: Line 483:
 
;not an argument P1
 
;not an argument P1
 
:This identifier is not in the argument list for this function
 
:This identifier is not in the argument list for this function
 +
 +
== O ==
  
 
;only functions may be qualified interrupt P1
 
;only functions may be qualified interrupt P1
Line 479: Line 503:
 
;operands of operator not same type P1
 
;operands of operator not same type P1
 
:The operands to the named operator in the expression are incompatible types
 
:The operands to the named operator in the expression are incompatible types
 +
 +
== P ==
  
 
;pointer required P1
 
;pointer required P1
Line 512: Line 538:
 
;pushreg - bad reg CGEN
 
;pushreg - bad reg CGEN
 
:Internal error - contact HI-TECH
 
:Internal error - contact HI-TECH
 +
 +
== R ==
  
 
;redundant & applied to array P1
 
;redundant & applied to array P1
Line 518: Line 546:
 
;regused - bad arg to G CGEN
 
;regused - bad arg to G CGEN
 
:Internal error - contact HI-TECH
 
:Internal error - contact HI-TECH
 +
 +
== S ==
  
 
;signatures do not matchLINK
 
;signatures do not matchLINK
Line 551: Line 581:
 
;Syntax error in checksum list LINK
 
;Syntax error in checksum list LINK
 
:The checksum list provided is invalid
 
:The checksum list provided is invalid
 +
 +
== T ==
  
 
;token too long CPP
 
;token too long CPP
Line 602: Line 634:
 
;type specifier reqd. for proto arg P1
 
;type specifier reqd. for proto arg P1
 
:A prototype argument must have a basic type
 
:A prototype argument must have a basic type
 +
 +
== U ==
  
 
;undefined control CPP
 
;undefined control CPP
Line 638: Line 672:
 
;unterminated macro call CPP
 
;unterminated macro call CPP
 
:Probably missing )
 
:Probably missing )
 +
 +
== V ==
  
 
;void function cannot return value P1
 
;void function cannot return value P1
 
:A function declared void cannot return a value
 
:A function declared void cannot return a value
 +
 +
== W ==
  
 
;Write error (out of disk space?) LINK
 
;Write error (out of disk space?) LINK
 
:Probably means the disk is full
 
:Probably means the disk is full

Latest revision as of 04:03, 29 November 2017

Error Messages produced by the compiler are listed below. Each message is followed by the name of the program which produces it, and some further description of what causes the message or what to do about it.

.

'.' expected after '..' P1
The ellipsis symbol must have three dots

A

actuals too long CPP
Reduce length of macro arguments
argument list conflicts with prototype P1
The argument list in a function definition must agree with a prototype if one exists
argument redeclared P1
This argument has been declared twice
arithmetic overflow in constant expression CGEN
Evaluation of this constant expression produced an arithmetic overflow. This may or may not represent a true error.
array index out of bounds P1
An array index expression evaluates to a constant which is less than zero or greater than or equal to the dimension of the array
Assertion CGEN
Internal error - contact HI-TECH
attempt to modify const object P1
An attempt has been made to assign to or otherwise modify an object designated as 'const'

B

bad bitfield type P1
Bitfields must be of type 'int'
Bad conval CGEN
Internal error - contact HI-TECH
Bad dimensions CGEN
An array has bad dimensions - probably zero
Bad element count expr CGEN
Internal error - contact HI-TECH
bad formal CPP
Check macro defintion syntax
bad include syntax CPP
Use only "" and <> for include files
Bad int. code CGEN
The intermediate code file has been corrupted - can be caused by running out of disk space
Bad -M option CGEN
A -M option passed to the code generator is unknown
Bad mod '+' for how = c CGEN
Internal error - contact HI-TECH
bad object code format LINK
This file is either corrupted or not a valid object file
Bad op d to swaplog CGEN
Internal error - contact HI-TECH
Bad op n to revlog CGEN
Internal error - contact HI-TECH
bad origin format in spec LINK
An address in a -p option is invalid
bad '-p' format LINK
The -p option provided is invalid
Bad pragma c CGEN
The code generator has been passed a pragma it does not know about
Bad putwsize CGEN
Internal error - contact HI-TECH
bad storage class P1, CGEN
The speficied storage class is illegal
Bad U usage CGEN
Internal error - contact HI-TECH
Bit field too large (n bits) CGEN
A bit field may not be larger than an int

C

Cannot get memory LINK
The linker has run out of dynamic memory
Can't be both far and near P1
The 'far' and 'near' keywords cannot appear in the same type specifier
can't be long P1
Chars and shorts cannot be long
can't be register P1
An extern or static variable may not be register
can't be short P1
Float and char cannot be short
can't be unsigned P1
Float cannot be unsigned
can't call an interrupt function P1
A function qualified 'interrupt' can only be called by hardware, not by an ordinary function call
Can't create filename CGEN
The file specified could not be created
Can't create xref file P1
The cross reference file specified could not be created
Can't create CPP
Output file could not be created
Can't create LINK
The linker cannot create a file
Can't find include file CPP
Check and correct the include file name - spaces are not allowed in file names
Can't find register for bits CGEN
Internal error - contact HI-TECH
Can't generate code for this expression CGEN
The code generator is unable to generate code for this expression - simplifying the expression (e.g. computing values into temporary variables) will usually correct

it, otherwise contact HI-TECH

can't have array of functions P1
You cannot have an array of functions - you can have an array of pointers to functions
Can't have 'port' variable CGEN
You cannot declare a variable to be qualified 'port' - you can only use port to qualify pointers or typecast constant values
can't have storage class P1
A storage class may not appear in a prototype argument
can't initialise auto aggregates P1
You cannot initialise a structure or array inside a function unless it is static
can't initialize arg P1
An argument cannot have an initializer
can't mix proto and non-proto args P1
You cannot mix prototype and non-prototype arguments even in a function definitional
Can't open filename CGEN
The file specified could not be opened for reading
Can't open LINK
The linker cannot open a file
Can't seek LINK
The linker could not seek in file
can't take address of register variable P1
You can't take the address of a variable in a register
can't take sizeof func CGEN
You can't take the size of a function. You can take the size of a function call
can't take this address P1
The expression does not have an address
'case' not in switch P1
A 'case' label is permitted only inside a switch
char const too long P1
A character constant may have only one character in it
close error (disk space?) P1
Probably out of disk space
common symbol psect conflict LINK
A common symbol is defined to be in more than one psect
constant conditional branch CGEN
You have a program structure testing a constant expression, e.g. while(1). You should substitute for this the more efficient for(;;)
constant expression required P1
A constant expression is required in e.g. an array dimension
constant operand to || or && CGEN
A logical operator has a constant operand which has been optimized out

D

declarator too complex P1
This declaration is too complex for the compiler to handle
default case redefined P1
Only one default case is permitted in a switch
'default' not in switch P1
A 'default' label is permitted only inside a switch
digit out of range P1
An octal constant may not contain 7 or 8, and a decimal constant may not contain A-F
dimension required P1
A dimension is required for all except the most significant in an array declaration
Division by zero CGEN
Attempt to divide by zero in this expression
Duplicate case label n CGEN
There are two case labels in this switch that have the same value
Duplicate -d flag LINK
Only one -d flag is allowed to the linker
duplicate label P1
This label is defined twice
Duplicate -m flag LINK
Only one -m flag is allowed to the linker
duplicate qualifier P1
The same qualifier appears more than once in this type specifier

E

entry point multiply defined LINK
A program can only have one entry point (start address)
EOF in #asm P1
End of file was encounterd after #asm and before a #endasm was seen
Error closing output file CGEN,CPP
Probably means you have run out of disk space
excessive -I file ignored CPP
Use fewer -I options
expand - bad how CGEN
Internal error - contact HI-TECH
expand - bad which CGEN
Internal error - contact HI-TECH
exponent expected P1
An exponent is expected after the 'e' or 'E' in a floating point constant. The exponent must contain only +, - and digits 0-9
Expression error CGEN
Internal error - contact HI-TECH
expression generates no code CGEN
This expression has no side effects and thus generates no code. It has been optimized out
expression syntax P1
The expression is badly formed
expression too complex P1
The expression has too many nested parantheses or other nested constructs

F

Fixup overflow referencing LINK
The linker has relocated a reference to a psect or symbol and the relocated address is too big to fit into the space, e.g. a relocated one byte address exceeds 256 or a relocated 16 bit address exceeds 65536
float param coerced to double P1
This float parameter has been converted to double - a prototype will override this coercion
function() declared implicit int P1
This function has been called without an explicit declaration. It is wise to explicitly declare all functions, preferably with a prototype. This will avoid many potential errors where your program comprises more than one source file
function does not take arguments P1
The prototype for this function indicates it takes no arguments
function or function pointer required P1
A function identifier or pointer to function is required for a function call.
functions can't return arrays P1
A function cannot return an array - it can return a pointer
functions can't return functions P1
A function cannot return a function - it can return a pointer to function

H

hex digit expected P1
A hex digit is expected after '0x'

I

identifier is a structure tag P1
A structure tag has been used in a context where another kind of tag is expected, e.g. saying struct fred where fred has previously been declared as union fred.
identifier is a union tag P1
Similar to the above error
identifier is an enum tag P1
Similar to the above error
identifier: large offset CGEN
Z80 only: This identifier has a large offset from the stack frame and thus access to it is inefficient. In a function any arrays should be declared after any simple variables
identifier redeclared P1
The identifier has been redeclared with different attributes
identifier redefined P1
An identifier has been defined twice
If-less else CPP
Check #if usage
If-less endif CPP
Check #if usage
illegal '#' directive P1
A # directive passed through to the first pass is unknown. If this occurs with a #include it may be caused by a previous include file not having a <CR><LF> or newline on the last line.
Illegal character in preprocessor if CPP
Check for strange character
illegal character P1
A character unknown to the compiler has been encountered. The value given is the octal value of the character
illegal conversion between pointer types P1
The expression causes one pointer type to be converted to another incompatible type
illegal conversion of integer to pointer P1
An integer is used where a pointer is expected
illegal conversion of pointer to integer P1
A pointer is used where an integer is expected
illegal conversion P1
The type conversion here is illegal
Illegal flag LINK
This option is illegal
illegal function qualifier(s) P1
A function cannot have 'const' qualification
illegal initialisation P1
The initialisation of this variable is illegal
Illegal number CPP
Check number syntax
illegal type for array dimension P1
An array dimension must be an integral quantity
illegal type for index expression P1
An array index must be a simple integral expression
illegal type for switch expression P1
The expression in a 'switch' must be integral
illegal use of void expression P1
Void expressions may not be used in any way
implicit conversion of float to integer P1
A floating point value has been converted to integer - truncation may occur
implicit return at end of non-void function P1
A function with a non-void type has returned without a return statement
implict signed to unsigned conversion P1
Unwanted sign extension may occur here. Add an explicit typecast to force exactly the conversion you want
inappropriate break/continue P1
inappropriate 'else' P1
An 'else' has appeared without a matching 'if'
inconsistent storage class P1
Only one storage class may be specified in a declaration
inconsistent type P1
Only one basic type may be specified in a declaration
initialisation illegal in arg list P1
You cannot initialise a function parameter
initialisation syntax P1
The syntax of this initialisation is illegal
initializer in 'extern' declaration P1
A declaration with the 'extern' keyword has an initializer; this is not permitted as the extern declaration reserves no storage
integer constant expected P1
An integer constant was expected here
integer expression required P1
An integral expression is required here
integral type required P1
An integral type is required here

L

large offset CGEN
Z80 only: This identifier has a large offset from the stack frame and thus access to it is inefficient. In a function any arrays should be declared after any simple variables
Line too long P1
The source line is too long, or does not have a <CR><LF> or newline at the end
local psect conflicts with global psect of same name LINK
A local psect cannot have the same name as a global psect
logical type required P1
A logical type (i.e. an integral type) is required as the subject of a conditional expression
lvalue required P1
An lvalue, i.e. something which can be assigned to, is required after an '&' or on the left hand of an assignment

M

macro recursion CPP
A preprocessor macro has attempted to expand itself. This would create infinite recursion
member is not a member of the struct/union P1
This member is not in the structure or union with which it is used
members cannot be functions P1
A member cannot be a function - it can be a pointer to function
Missing arg to -u LINK
-u requires an argument
Missing arg to -w LINK
-w requires an argument
missing ) CPP
Put correct ) in expression
Missing number after % in -p option LINK
After % in a -p option there must be a number
Missing number after pragma 'pack' P1
The correct syntax is #pragma pack(n) where n is 1, 2 or 4.
module has code below file base LINK
A -C option was specified but the program has code below the address specified as the base of the binary file
multiply defined symbol LINK
A symbol is defined more than once

N

name is a union, struct or enum P1
A union, struct or enum tag has been re-used in a different context
No case labels CGEN
This switch has no case labels
no identifier in declaration P1
This declaration should have an identifier in it
No room CGEN
The code generator has run out of dynamic memory. You will need to reduce the number of symbols and/or the complexity of expressions
No source file CPP
Source file could not be found - check spelling, directory paths etc.
no space CPP
Reduce number/size of macro definitions
no start record
entry point defaults to zero LINK
No start address has been specified for the program; the linker has set the start address to 0
Non-constant case label CGEN
This case label does not evaluate to an integral constant
non-void function returns no value P1
A function which should return a value has a 'return' statement with no value
not a variable identifier P1
The identifier is not a variable - it may be e.g. a label or structure tag
not an argument P1
This identifier is not in the argument list for this function

O

only functions may be qualified interrupt P1
The type qualifier 'interrupt' may be applied only to functions, not variables.
only functions may be void P1
Only functions, not variables, may be declared void
only lvalues may be assigned to or modified P1
You have attempted to modify an expression which does not identify a storage location
only register storage class allowed P1
A parameter may only be auto or register
operands of operator not same pointer type P1
The operands to the named operator in the expression are both pointers but are not the same pointer type
operands of operator not same type P1
The operands to the named operator in the expression are incompatible types

P

pointer required P1
A pointer is required after a '*' (indirection) operator
popreg - bad reg CGEN
Internal error - contact HI-TECH
portion of expression has no effect CGEN
A portion of this expression has no effect on its value and no side effects
probable missing '}' in previous block P1
A declaration has been encountered where an expression was expected. The likely cause of this is that you have omitted a closing '}' in the function above this point.
psect cannot be in classes a and b LINK
A psect can only be in one class
psect exceeds max size LINK
This psect is larger than a specified maximum size
psect is absolute LINK
This psect is absolute and cannot have a link address specified in a -p option
Psect not loaded on 0xhexnum boundary LINK
This psect must be loaded on a specific boundary
Psect not relocated on 0xhexnum boundary LINK
This psect must be linked on a specific boundary
psect origin multiply defined LINK
This psect has its link address defined more than once
pushreg - bad reg CGEN
Internal error - contact HI-TECH

R

redundant & applied to array P1
An array type has an '&' operator applied to it. It has been ignored since use of an array implicitly gives its address
regused - bad arg to G CGEN
Internal error - contact HI-TECH

S

signatures do not matchLINK
An extern function has been declared with an incorrect prototype. For example if an argument is declared as a long in an extern declaration, but is really an int, a signature mismatch will occur.
signed bitfields not supported P1
Only unsigned bitfields are supported
simple type required P1
An array or structure type cannot be used here
Sizeof yields 0 CGEN
The size of an object has evaluated to zero in a context where this is illegal, e.g. incrementing a pointer to a zero length object.
storage class illegal P1
A storage class may not be specified here
struct/union member expected P1
A structure or union member is required after a '. or '->'
struct/union redefined P1
This structure or union has been defined twice
struct/union required P1
A structure or union identifier is required before a '.'
Switch on long! CGEN
Switching on a long expression is not supported
symbol cannot be global LINK
Stack, filename or line number symbols cannot be global
Syntax error in checksum list LINK
The checksum list provided is invalid

T

token too long CPP
Shorten token (e.g. identifier)
too few arguments P1
The protype for this function lists more arguments than have been supplied
too many arguments P1
More arguments have been supplied than listed in the prototype for this function
Too many cases in switch CGEN,P1
There are too many cases in this switch
too many -D options CPP
Use fewer -D options
too many defines CPP
Reduce number of macro definitions
Too many errors CGEN
CGEN has given up because there were too many errors.
too many formals CPP
Reduce number of parameters to this macro definition
Too many initializers CGEN
There are too many initializers for this object
Too many psects LINK
There are too many psects for the symbol table
Too many symbols LINK
There are too many symbols for the linker symbol table
too many -U options CPP
Use fewer -U options
too much defining CPP
Reduce number/size of macros
too much indirection P1
Too many '*'s in this declaration
too much pushback CPP
Simplify macro usage
type conflict P1
There is a conflict of types in this expression, e.g. attempting to assign a structure to a simple type
type specifier reqd. for proto arg P1
A prototype argument must have a basic type

U

undefined control CPP
Check use of #
undefined enum tag P1
This enumerated type tag has not been defined
undefined identifier P1
This identifier has not been defined before use
undefined struct/union P1
The structure or union used has not been defined
undefined symbol LINK
A list of undefined symbols follows. If some of the symbols should be in a library which was linked, it may be caused by a library ordering problem. In this case rebuild the library with the correct ordering or specify the library more than once in the link command
unexpected EOF P1
End of file was encountered in the middle of a C construct. This is commonly caused by omission of a closing '}' earlier in the program.
Unknown predicate CGEN
Internal error - contact HI-TECH
unknown psect LINK
The psect specifed in a -p option is not present in the program. Check the spelling and check the case - upper case does not match lower case
unreachable code P1
This section of code can never be executed as there is no possible path to reach it
Unreasonable include nesting CPP
Reduce number of include files
Unreasonable matching depth CGEN
Internal error - contact HI-TECH
unterminated macro call CPP
Probably missing )

V

void function cannot return value P1
A function declared void cannot return a value

W

Write error (out of disk space?) LINK
Probably means the disk is full