5 COMPILER DIAGNOSTICS

This chapter contains the following sections:

Introduction
Return Values
Errors and Warnings

5.1 Introduction

cxa 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, cxa 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, cxa displays the line number causing the error before the error message. cxa 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

cxa 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 cxa 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 207 list of rule numbers expected after "-safer" option

W 208 unsupported Safer C rule number number.

E 209 +Safer C rule number violation: rule_description

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 216 suggest parentheses around assignment used as truth value

W 303 variable 'name' uninitialized

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

Backend

W 501 function qualifier used on non-function

W 502 force jump table for switch statements (-Ot) ignored: jump table would exceed 64K

W 508 duplicate function qualifier - 'name' ignored

E 509 illegal interrupt offset, specify -ivo=<value>

E 510 base-address of interrupt vectors must have 4-byte alignment

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

W 512 'number' illegal '_interrupt' vector number (-1, or 0 to 70) - ignored

E 513 calling an _interrupt routine, use '_intxa()'

E 514 conflict in 'function_qualifier' attribute

E 515 different 'function_qualifier' number(s)

E 516 'memory_type' is illegal memory for function

W 517 conversion of long address to short address

E 519 interrupt function not supported for User Mode only applications

E 522 function automatic(s) and/or temporary storage occupy more stack space than the available 64K

F 524 illegal memory model

W 525 not saving register name in interrupt frame can lead to run-time errors

E 526 function qualifier '_asmfunc' not allowed in function definition

E 527 illegal frame register name, only R0..R6,DS,CS,ES and SSEL are allowed

E 528 _at() requires a numerical address

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

E 530 _at()/_atbit() only valid for global variables

E 531 _at()/_atbit() only allowed for uninitialized variables

E 532 _at() has no effect on external declaration

W 533 cxa language extension keyword used as identifier

E 534 memory_space section name exceed max section size of size

W 535 variable name needs alignment to an even address

W 536 superfluous function qualifier for Page Zero memory models - '_pagezero' ignored

E 538 '_trap' is not allowed with '_interrupt()'

E 539 different '_interrupt' or '_trap' number(s)

E 540 not allowed to indirect call a _trap function

W 541 User mode application should not contain software trap function definitions

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

W 543 User/Trace mode is enabled in interrupt service routine

E 544 'memory' not supported by SmartXA cpu, converted to 'memory'

E 545 maximum interrupt number is number

E 546 24-bit data access is not allowed for SmartXA user mode applications

E 547 Large memory model does not support SmartXA user mode applications

E 548 CPU mode independent applications are not supported on SmartXA

E 549 _sfrbyte/_sfrbit (name) declared without '_at()'/'_atbit()'

E 551 first/second operand of function() is not pointing to name memory space

E 552 'name' is not bitaddressable

E 553 bitoffset for 'name' must be a constant value between 0 and 7

F 554 illegal memory type specified

E 555 '_name()' without '_interrupt()' or '_trap()'

E 556 interrupt with vector number number can only be activated by hardware

E 557 special function register 'name' not defined, use _sfrbyte/_sfrbit

E 558 argument #number is not an integral constant expression

E 562 bit type parameter not allowed

E 563 number of '_interrupt()' parameters not equal to '_using()' parameters

E 564 '_trap()' without '_using()'
'_interrupt()' without '_using()'
'_frame()' without '_interrupt()'

W 565 '_huge' not allowed in this memory model, converted to '_far'

E 566 special function registers may not be initialized

E 567 _atbit() only possible on objects, not on constant addresses

E 568 _atbit() only valid for global variables

E 569 'offset' must be a constant value between 0 and 15

E 570 _atbit() only possible for _bit/_sfrbit objects

E 571 _atbit() only possible on _bitbyte/_sfrbyte objects

E 572 specified object not BIT-addressable

E 573 _atbit() object must have same storage as target object

E 574 _sfrbit object can only have _atbit() on a _sfrbyte object
_bit object can only have _atbit() on a _bitbyte object

E 575 '_edata' only supported by SmartXA cpu in System mode

W 576 conversion from larger '_rom' to smaller '_edata' address space, address is truncated.

W 577 Code group 'CS' needs to be located in EEPROM address space

W 578 conversion of '_generic' pointer with 24-bit arithmetic to '_far' pointer with 16-bit arithmetic.

E 579 _generic storage type specifier is only allowed in the logical type of a pointer

E 580 '_generic' not supported by SmartXA cpu running in user mode

W 581 storage space information loss on conversion from '_generic' to '_far'

W 582 Deprecated: option '-Ad' is replaced by option '-Td'

W 583 Deprecated: option '-Au' has become obsolete

E 584 absolute variable name exceeds boundary space address boundary


Copyright © 2000 TASKING, Inc.