5 COMPILER DIAGNOSTICS

This chapter contains the following sections:

Introduction
Return Values
Errors and Warnings

5.1 Introduction

c563 has three classes of messages: user errors, warnings and internal compiler errors.

Some user error messages carry extra information, which is displayed by the compiler after the normal message. The messages with extra information are marked with 'I' in the list below. They never appear without a previous error message and error number. The number of the information message is not important, and therefore, this number is not displayed. A user error can also be fatal (marked as 'F' in the list below), which means that the compiler aborts compilation immediately after displaying the error message and may generate a 'not complete' output file.

The error numbers and warning numbers are divided in two groups. The frontend part of the compiler uses numbers in the range 0 to 499, whereas the backend (code generator) part of the compiler uses numbers in the range 500 and higher. Note that most error messages and warning messages are produced by the frontend.

If you program a non fatal error, c563 displays the C source line that contains the error, the error number and the error message on the screen. If the error is generated by the code generator, the C source line displayed always is the last line of the current C function, because code generation is started when the end of the function is reached by the frontend. However, in this case, c563 displays the line number causing the error before the error message. c563 always generates the error number in the assembly output file, exactly matching the place where the error occurred.

So, when a compilation is not successful, the generated output file is not accepted by the assembler, thus preventing a corrupt application to be made (see also the -e option).

Warning messages do not result into an erroneous assembly output file. They are meant to draw your attention to assumptions of the compiler, for a situation which may not be correct. Warning messages can be controlled with the -w[num] option.

The last class of messages are the internal compiler errors. The following format is used:

These errors are caused by failed internal consistency checks and should never occur. However, if such a 'SYSTEM' error appears, please report the occurrence to TASKING, using a Problem Report form. Please include a diskette or tape, containing a small C program causing the error.

5.2 Return Values

c563 returns an exit status to the operating system environment for testing.

For example,

in a BATCH-file you can examine the exit status of the program executed with ERRORLEVEL:

In a bourne shell script, the exit status can be found in the $? variable, for example:

The exit status of c563 is one of the numbers of the following list:

5.3 Errors and Warnings

Errors start with an error type, followed by a number and a message. The error type is indicated by a letter:

Frontend

F 1 evaluation expired

W 2 unrecognized option: 'option'

E 4 expected number more '#endif'

E 5 no source modules

F 6 cannot create "file"

F 7 cannot open "file"

F 8 attempt to overwrite input file "file"

E 9 unterminated constant character or string

F 11 file stack overflow

F 12 memory allocation error

W 13 prototype after forward call or old style declaration - ignored

E 14 ';' inserted

E 15 missing filename after -o option

E 16 bad numerical constant

E 17 string too long

E 18 illegal character (0xhexnumber)

E 19 newline character in constant

E 20 empty character constant

E 21 character constant overflow

E 22 '#define' without valid identifier

E 23 '#else' without '#if'

E 24 '#endif' without matching '#if'

E 25 missing or zero line number

E 26 undefined control

W 27 unexpected text after control

W 28 empty program

E 29 bad '#include' syntax

E 30 include file "file" not found

E 31 end-of-file encountered inside comment

E 32 argument mismatch for macro "name"

E 33 "name" redefined

W 34 illegal redefinition of macro "name"

E 35 bad filename in '#line'

W 36 'debug' facility not installed

W 37 attempt to divide by zero

E 38 non integral switch expression

F 39 unknown error number: number

W 40 non-standard escape sequence

E 41 '#elif' without '#if'

E 42 syntax error, expecting parameter type/declaration/statement

E 43 unrecoverable syntax error, skipping to end of file

I 44 in initializer "name"

E 46 cannot hold that many operands

E 47 missing operator

E 48 missing right parenthesis

W 49 attempt to divide by zero - potential run-time error

E 50 missing left parenthesis

E 51 cannot hold that many operators

E 52 missing operand

E 53 missing identifier after 'defined' operator

E 54 non scalar controlling expression

E 55 operand has not integer type

W 56 '<debugoption><level>' no associated action

W 58 invalid warning number: number

F 59 sorry, more than number errors

E 60 label "label" multiple defined

E 61 type clash

E 62 bad storage class for "name"

E 63 "name" redeclared

E 64 incompatible redeclaration of "name"

W 66 function "name": variable "name" not used

W 67 illegal suboption: option

W 68 function "name": parameter "name" not used

E 69 declaration contains more than one basic type specifier

E 70 'break' outside loop or switch

E 71 illegal type specified

W 72 duplicate type modifier

E 73 object cannot be bound to multiple memories

E 74 declaration contains more than one class specifier

E 75 'continue' outside a loop

E 76 duplicate macro parameter "name"

E 77 parameter list should be empty

E 78 'void' should be the only parameter

E 79 constant expression expected

E 80 '#' operator shall be followed by macro parameter

E 81 '##' operator shall not occur at beginning or end of a macro

W 86 escape character truncated to 8 bit value

E 87 concatenated string too long

W 88 "name" redeclared with different linkage

E 89 illegal bitfield declarator

E 90 #error message

W 91 no prototype for function "name"

W 92 no prototype for indirect function call

I 94 hiding earlier one

F 95 protection error: message

E 96 syntax error in #define

E 97 "..." incompatible with old-style prototype

E 98 function type cannot be inherited from a typedef

F 99 conditional directives nested too deep

E 100 case or default label not inside switch

E 101 vacuous declaration

E 102 duplicate case or default label

E 103 may not subtract pointer from scalar

E 104 left operand of operator has not struct/union type

E 105 zero or negative array size - ignored

E 106 different constructors

E 107 different array sizes

E 108 different types

E 109 floating point constant out of valid range

E 110 function cannot return arrays or functions

I 111 parameter list does not match earlier prototype

E 112 parameter declaration must include identifier

E 114 incomplete struct/union type

E 115 label "name" undefined

W 116 label "name" not referenced

E 117 "name" undefined

W 118 constant expression out of valid range

E 119 cannot take 'sizeof' bitfield or void type

E 120 cannot take 'sizeof' function

E 121 not a function declarator

E 122 unnamed formal parameter

W 123 function should return something

E 124 array cannot hold functions

E 125 function cannot return anything

W 126 missing return (function "name")

E 129 cannot initialize "name"

W 130 operands of operator are pointers to different types

E 131 bad operand type(s) of operator

W 132 value of variable "name" is undefined

E 133 illegal struct/union member type

E 134 bitfield size out of range - set to 1

W 135 statement not reached

E 138 illegal function call

E 139 operator cannot have aggregate type

E 140 type cannot be applied to a register/bit/bitfield object or builtin/inline function

E 141 operator requires modifiable lvalue

E 143 too many initializers

W 144 enumerator "name" value out of range

E 145 requires enclosing curly braces

E 146 argument #number: memory spaces do not match

W 147 argument #number: different levels of indirection

W 148 argument #number: struct/union type does not match

E 149 object "name" has zero size

W 150 argument #number: pointers to different types

W 151 ignoring memory specifier

E 152 operands of operator are not pointing to the same memory space

E 153 'sizeof' zero sized object

E 154 argument #number: struct/union mismatch

E 155 casting lvalue 'type' to 'type' is not allowed

E 157 "name" is not a formal parameter

E 158 right side of operator is not a member of the designated struct/union

E 160 pointer mismatch at operator

E 161 aggregates around operator do not match

E 162 operator requires an lvalue or function designator

W 163 operands of operator have different level of indirection

E 164 operands of operator may not have type 'pointer to void'

W 165 operands of operator are incompatible: pointer vs. pointer to array

E 166 operator cannot make something out of nothing

E 170 recursive expansion of inline function "name"

E 171 too much tail-recursion in inline function "name"

W 172 adjacent strings have different types

E 173 'void' function argument

E 174 not an address constant

E 175 not an arithmetic constant

E 176 address of automatic is not a constant

W 177 static variable "name" not used

W 178 static function "name" not used

E 179 inline function "name" is not defined

E 180 illegal target memory (memory) for pointer

E 181 invalid cast to function

W 182 argument #number: different types

W 183 variable 'name' possibly uninitialized

W 184 empty pragma name in -z option - ignored

I 185 (prototype synthesized at line number in "name")

E 186 array of type bit is not allowed

E 187 illegal structure definition

E 188 structure containing bit-type fields is forced into bitaddressable area

E 189 pointer is forced to bitaddressable, pointer to bitaddressable is illegal

W 190 "long float" changed to "float"

E 191 recursive struct/union definition

E 192 missing filename after -f option

E 194 cannot initialize typedef

W 195 constant expression out of range -- truncated

W 196 constant expression out of range due to signed/unsigned type mismatch

W 197 unrecognized -w argument: argument

W 198 trigraph sequence replaced

F 199 demonstration package limits exceeded

W 200 unknown pragma "name" - ignored

W 201 name cannot have storage type - ignored

E 202 'name' is declared with 'void' parameter list

E 203 too many/few actual parameters

W 204 U suffix not allowed on floating constant - ignored

W 205 F suffix not allowed on integer constant - ignored

E 206 'name' named bit-field cannot have 0 width

E 212 "name": missing static function definition

W 213 invalid string/character constant in non-active part of source

E 214 second occurrence of #pragma asm or asm_noflush

E 215 "#pragma endasm" without a "#pragma asm"

W 303 variable 'name' possibly uninitialized

E 327 too many arguments to pass in registers for _asmfunc 'name'

F 347 Error in constraints for inline assembly: Wrong register-size or no memory or immediate possible

F 348 Error in constraints for inline assemly: Numeric constraint (opr nbr number) out of range.

F 349 Error in constraints for inline assembly: Second numeric constraint to the same output

W 358 User stack pointer register can not be reserved

Backend

W 501 function qualifier used on non-function

W 502 _fract constant saturation occurred

E 503 cache pragma requires function address

W 504 24-bit pointer calculation requires mode switching

W 508 function qualifier duplicated

F 509 invalid name option

F 510 illegal number in option name

E 511 interrupt function must have void result and void parameter list

W 512 'number' illegal interrupt number (-1, or 0 to 63) - ignored

E 513 calling an interrupt routine, use '_swi()'

E 514 conflict in 'attribute_type' attribute

E 515 different '_long_interrupt | _fast_interrupt' number

E 516 'memory_type' is illegal memory for function: program '_P' only

W 517 conversion of long address to short address

W 518 conversion of fractional to integer type occurred

W 519 conversion of integer to fractional type occurred

W 520 conversion of _circular pointer does not preserve circular information.

F 524 illegal memory model

W 525 function qualifier '_reentrant' ignored for static memory model

E 526 illegal __asm() constraint string

E 527 illegal __asm() modifier char for register reg

E 528 _at() requires a numerical address

E 529 _at() address out of range for this type of object

E 530 _at() only valid for global variables

E 531 _at() only allowed for uninitialized variables

W 532 _at() has no effect on external declaration

W 533 c56 language extension keyword used as identifier

E 534 hardware stack level must be in range 1..15/16

E 536 illegal syntax used for default section name 'name' in -R option

E 537 default section name 'name' not allowed

W 538 default section name 'name' already renamed to 'new_name'

W 542 optimization stack underflow, no optimization options are saved with #pragma optimize

W 543 fast interrupt code section too large - long interrupt substituted

W 544 fast interrupt routine must be committed to a vector - ignored

W 546 illegal modifier for this type - ignored

E 547 assignment of a circular object to a non-circular pointer

assignment of a non-circular object to a circular pointer

E 549 only _circ pointers and arrays/structs/unions are allowed - ignored on 'name'

only _circ pointers and arrays/structs/unions are allowed - ignored on struct/union member 'name'

W 551 recursion in non-reentrant function 'name'

E 552 only 'long' type objects are allowed in _L memory space - ignored on 'symbol_name'

E 553 only 'long' type struct/union members are allowed in _L memory space - ignored on 'symbol_name'

W 555 current optimization level could reduce debugging comfort (-g); the -O2 or -O4 option may be used to improve this

W 556 Register name cannot be reserved: invalid register

Register name cannot be reserved: is a function return register

W 557 Register name cannot be reserved: is used for dynamic stack

E 558 Error in reserving registers: not enough address registers left

E 559 Intrinsic function call needs a reserved register

E 560 Invalid operand in intrinsic function call

E 562 Cache sector size must be 128 or 256

E 563 _circ pointer has modulo size 0

E 564 invalid intrinsic function for this DSP type

W 565 intrinsic function is not supported on all silicon revisions

W 566 packed strings not supported when generating Motorola assembler compatible output, #pragma ignored

E 567 'mem' is illegal memory for jumptable

W 568 Depth of hardware stack limited without disabling hardware stack extension

W 569 Motorola compatibility mode selected with stack in L-memory; use -ML to disable

E 570 _compatible function definition not allowed with new-style stackframe; use -Cs to disable

F 571 Maximum number of nested loops exceeded

F 572 arg of function qualifier '_bank' out of range; check -p option

W 573 Not possible to use different calling conventions on same function, function qualifier qualifier ignored.


Copyright © 2002 Altium BV