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:
S number: internal error - please report
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:
cxa -s %1.c
IF ERRORLEVEL 1 GOTO STOP_BATCH
In a bourne shell script, the exit status can be found in the $? variable, for example:
cxa $*
case $? in
0) echo ok ;;
1|2|3) echo error ;;
esac
The exit status of cxa is one
of the numbers of the following list:
0 Compilation successful, no errors
1 There were user errors, but terminated normally
2 A fatal error, or System error occurred, premature ending
3 Stopped due to user abort
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:
I information
E error
F fatal error
S internal compiler error
W warning
Frontend
F 1 evaluation expired
Your product evaluation period has expired. Contact your local TASKING office for the official product.
W 2 unrecognized option: 'option'
The option you specified does not exist. Check the invocation syntax for the correct option.
E 4 expected number more '#endif'
The preprocessor part of the compiler found the'#if', '#ifdef' or
'#ifndef' dirctive but did not find a corresponding '#endif' in the same source file. Check your source file that each '#if', '#ifdef' or '#ifndef'
has a corresponding '#endif'.
E 5 no source modules
You must specify at least one source file to compile.
F 6 cannot create "file"
The output file or temporary file could not be created. Check if you have sufficient disk space and if you have write permissions in the specified directory.
F 7 cannot open "file"
Check if the file you specified really exists. Maybe you misspelled
the name, or the file is in another directory.
F 8 attempt to overwrite input file "file"
The output file must have a different name than the input file.
E 9 unterminated constant character or string
This error can occur when you specify a string without a closing double-quote (") or when you specify a character constant without a closing single-quote ('). This error message is often preceded by one or more E 19 error messages.
F 11 file stack overflow
This error occurs if the maximum nesting depth (50) of file inclusion
is reached. Check for #include files that contain other #include files.
Try to split the nested files into simpler files.
F 12 memory allocation error
All free space has been used. Free up some memory by removing any resident programs, divid the file into several smaller source files,
break expressions into smaller subexpressions or put in more memory.
W 13 prototype after forward call or old style declaration
- ignored
Check that a prototype for each function is present before the actual call.
E 14 ';' inserted
An expression statement needs a semicolon. For example, after
++i in { int i; ++i }.
E 15 missing filename after -o option
The -o option must be followed by an output filename.
E 16 bad numerical constant
A constant must conform to its syntax. For example,
08 violates
the octal digit syntax. Also, a constant may not be too large to be represented in the type to which it was assigned. For example, int i = 0x1234567890; is too large to fit in an integer.
E 17 string too long
This error occurs if the maximum string size (1500) is reached. Reduce the size of the string.
E 18 illegal character (0xhexnumber)
The character with the hexadecimal ASCII value 0xhexnumber
is not allowed here. For example, the '#' character, with hexadecimal value 0x23, to be used as a preprocessor command, may not be preceded by non-white space characters. The following is an example of this error:
char *s = #S ; // error
E 19 newline character in constant
The newline character can appear in a character constant or string constant only when it is preceded by a backslash (\). To break a string that is on two lines in the source file, do one of the following:
- End
the first line with the line-continuation character, a backslash (\).
- Close
the string on the first line with a double quotation mark, and open the string on the next line with another quotation mark.
E 20 empty character constant
A character contant must contain exactly one character. Empty character contants ('') are not allowed.
E 21 character constant overflow
A character contant must contain exactly one character. Note that
an escape sequence (for example, \t for tab) is converted
to a single character.
E 22 '#define' without valid identifier
You have to supply an identifier after a '#define'.
E 23 '#else' without '#if'
'#else' can only be used within a corresponding '#if', '#ifdef' or
'#ifndef' construct. Make sure that there is a '#if', '#ifdef' or '#ifndef'
statement in effect before this statement.
E 24 '#endif' without matching '#if'
'#endif' appeared without a matching '#if', '#ifdef' or '#ifndef' preprocessor directive. Make sure that there is a matching '#endif'
for each '#if', '#ifdef' and '#ifndef' statement.
E 25 missing or zero line number
'#line' requires a non-zero line number specification.
E 26 undefined control
A control line (line with a '#identifier') must contain
one of the known preprocessor directives.
W 27 unexpected text after control
'#ifdef' and '#ifndef' require only one identifier. Also, '#else'
and '#endif' only have a newline. '#undef' requires exactly one identifier.
W 28 empty program
The source file must contain at least one external definition. A source file with nothing but comments is considered an empty program.
E 29 bad '#include' syntax
A '#include' must be followed by a valid header name syntax. For example, #include <stdio.h misses the closing '>'.
E 30 include file "file" not found
Be sure you have specified an existing include file after a '#include' directive. Make sure you have specified the correct path for the file.
E 31 end-of-file encountered inside comment
The compiler found the end of a file while scanning a comment. Probably a comment was not terminated. Do not forget a closing comment '*/' when using ANSI-C style comments.
E 32 argument mismatch for macro "name"
The number of arguments in invocation of a function-like macro must agree with the number of parameters in the definition. Also, invocation of a function-like macro requires a terminating ")" token. The following are examples of this error:
#define A(a) 1
int i = A(1,2); /* error */
#define B(b) 1
int j = B(1; /* error */
E 33 "name" redefined
The given identifier was defined more than once, or a subsequent declaration differed from a previous one. The following examples generate this error:
int i;
char i; /* error */
main()
{
}
main()
{
int j;
int j; /* error */
}
W 34 illegal redefinition of macro "name"
A macro can be redefined only if the body of the redefined macro is exactly the same as the body of the originally defined macro.
This warning can be caused by defining a macro on the command line and in the source with a '#define' directive. It also can be caused
by macros imported from include files. To eliminate the warning, either remove one of the definitions or use an '#undef' directive before
the second definition.
E 35 bad filename in '#line'
The string literal of a #line (if present) may not be a "wide-char"
string. So, #line 9999 L"t45.c" is not allowed.
W 36 'debug' facility not installed
'#pragma debug' is only allowed in the debug version of the compiler.
W 37 attempt to divide by zero
A divide or modulo by zero was found. Adjust the expression or test
if the second operand of a divide or modulo is zero.
E 38 +non integral switch expression
A switch condition
expression must evaluate to an integral value. So, char *p = 0; switch (p) is not allowed.
F 39 unknown error number: number
This error may not occur. If it does, contact your local TASKING office and provide them with the exact error message.
W 40 non-standard escape sequence
Check the spelling of your escape sequence (a backslash, \,
followed by a number or letter), it contains an illegal escape character. For example, \c
causes this warning.
E 41 '#elif' without '#if'
The '#elif' directive did not appear within an '#if', '#ifdef or '#ifndef' construct. Make sure that there is a corresponding '#if', '#ifdef'
or '#ifndef' statement in effect before this statement.
E 42 syntax error, expecting parameter type/declaration/statement
A syntax error occurred in a parameter list a declaration or a statement. This can have many causes, such as, errors in syntax of numbers, usage of reserved words, operator errors, missing parameter types, missing tokens.
E 43 unrecoverable syntax error, skipping to end of file
The compiler found an error from which it could not recover. This error is in most cases preceded by another error. Usually, error E
42.
I 44 in initializer "name"
Informational message when checking for a proper constant initializer.
E 46 cannot hold that many operands
The value stack may not exceed 20 operands.
E 47 missing operator
An operator was expected in the expression.
E 48 missing right parenthesis
W 49 attempt to divide by zero - potential run-time error
An expression with a divide or modulo by zero was found. Adjust the expression or test if the second operand of a divide or modulo is
zero.
E 50 missing left parenthesis
E 51 cannot hold that many operators
The state stack may not exceed 20 operators.
E 52 missing operand
E 53 missing identifier after 'defined' operator
An identifier is required in a #if defined(identifier).
E 54 +non scalar controlling expression
Iteration conditions and 'if' conditions must have a scalar type (not
a struct, union or a pointer). For example, after
static struct {int i;} si = {0}; it is not allowed to specify
while (si) ++si.i;.
E 55 operand has not integer type
The operand of a '#if' directive must evaluate to an integral constant. So, #if 1.
is not allowed.
W 56 '<debugoption><level>' no associated
action
This warning can only appear in the debug version of the compiler. There is no associated debug action with the specified debug option and level.
W 58 invalid warning number: number
The warning number you supplied to the -w option does
not exist. Replace it with the correct number.
F 59 sorry, more than number errors
Compilation stops if there are more than 40 errors.
E 60 label "label" multiple defined
A label can be defined only once in the same function. The following is an example of this error:
f()
{
lab1:
lab1: /* error */
}
E 61 type clash
The compiler found conflicting types. For example, a
long is only allowed on int or double, no specifiers are allowed with struct, union or
enum. The
following is an example of this error:
unsigned signed int i; /* error */
E 62 bad storage class for "name"
The storage class specifiers auto and register may not appear in declaration specifiers of external definitions. Also, the only storage
class specifier allowed in a parameter declaration is
register.
E 63 "name" redeclared
The specified identifier was already declared. The compiler uses the second declaration. The following is an example of this error:
struct T { int i; };
struct T { long j; }; /* error */
E 64 incompatible redeclaration of "name"
The specified identifier was already declared. All declarations in
the same function or module that refer to the same object or function
must specify compatible types. The following is an example of this error:
f()
{
int i;
char i; /* error */
}
W 66 function "name": variable "name"
not used
A variable is declared which is never used. You can remove this unused variable or you can use the -w66 option to
suppress this warning.
W 67 illegal suboption: option
The suboption is not valid for this option. Check the invocation syntax for a list of all available suboptions.
W 68 function "name": parameter "name"
not used
A function parameter is declared which is never used. You can remove this unused parameter or you can use the -w68 option
to suppress this warning.
E 69 declaration contains more than one basic type specifier
Type specifiers may not be repeated. The following is an example of this error:
int char i; /* error */
E 70 +'break' outside loop or switch
A break statement
may only appear in a switch or a loop (do, for or while).
So, if (0) break; is not allowed.
E 71 illegal type specified
The type you specified is not allowed in this context. For example,
you cannot use the type void to declare a variable. The following is an example of this error:
void i; /* error */
W 72 duplicate type modifier
Type qualifiers may not be repeated in a specifier list or qualifier
list. The following is an example of this warning:
{ long long i; } /* error */
E 73 object cannot be bound to multiple memories
Use only one memory attribute per object. For example, specifying both rom and ram to the same object is not allowed.
E 74 declaration contains more than one class specifier
A declaration may contain at most one storage class specifier. So, register auto i; is not allowed.
E 75 +'continue' outside a loop
continue may
only appear in a loop body (do, for or while). So, switch (i) {default: continue;} is not allowed.
E 76 duplicate macro parameter "name"
The given identifier was used more than one in the formatl parameter list of a macro definition. Each macro parameter must be uniquely declared.
E 77 parameter list should be empty
An identifier list, not part of a function definition, must be empty.
For example, int f ( i, j, k ); is not allowed on declaration level.
E 78 'void' should be the only parameter
Within a function protoype of a function that does not except any arguments, void may be the only parameter. So, int f(void, int); is not allowed.
E 79 +constant expression expected
A constant expression may not contain a comma. Also, the bit field width, an expression that defines an enum, array-bound constants and switch case
expressions must all be integral contstant expressions.
E 80 '#' operator shall be followed by macro parameter
The '#' operator must be followed by a macro argument.
E 81 '##' operator shall not occur at beginning or end of
a macro
The '##' (token concatenation) operator is used to paste together adjacent preprocessor tokens, so it cannot be used at the beginning
or end of a macro body.
W 86 escape character truncated to 8 bit value
The value of a hexadicimal escape sequence (a backslash, \,
followed by a 'x' and a number) must fit in 8 bits storage. The number of bits per character may not be greater than 8. The following is an example of this warning:
char c = '\xabc'; /* error */
E 87 concatenated string too long
The resulting string was longer than the limit of 1500 characters.
W 88 "name" redeclared with different linkage
The specified identifier was already declared. This warning is issued when you try to redeclare an object with a different basic storage
class, and both objects are not declared extern or static. The following
is an example of this warning:
int i;
int i(); /* error E 64 and warning */
E 89 illegal bitfield declarator
A bit field may only be declared as an integer, not as a pointer or
a function for example. So, struct {int *a:1;} s; is not allowed.
E 90 #error message
The message is the descriptive text supplied in a '#error'
preprocessor directive.
W 91 no prototype for function "name"
Each function should have a valid function prototype.
W 92 no prototype for indirect function call
Each function should have a valid function prototype.
I 94 hiding earlier one
Additional message which is preceded by error E 63. The second declaration will be used.
F 95 protection error: message
Something went wrong with the protection key initialization. The message could be: "Key is not present or printer is not correct.",
"Can't read key.", "Can't initialize key.", or "Can't set key-model".
E 96 syntax error in #define
#define id(
requires a right-parenthesis ')'.
E 97 "..." incompatible with old-style prototype
If one function has a parameter type list and another function, with
the same name, is an old-style declaration, the parameter list may not
have ellipsis. The following is an example of this error:
int f(int, ...);
int f(); /* error, old-style */
E 98 function type cannot be inherited from a typedef
A typedef
cannot be used for a function definition. The following is an example of this error:
typedef int INTFN();
INTFN f {return (0);} /* error */
F 99 conditional directives nested too deep
'#if', '#ifdef' or '#ifndef' directives may not be nested deeper than
50 levels.
E 100 +case or default label not inside switch
The case:
or default:
label may only appear inside a switch.
E 101 vacuous declaration
Something is missing in the declaration. The declaration could be empty or an incomplete statement was found. You must declare array declarators and struct, union, or enum members. The following are examples of this error:
int ; /* error */
static int a[2] = { }; /* error */
E 102 +duplicate case or default label
Switch case
values must be distinct after evaluation and there may be at most one default: label inside a switch.
E 103 may not subtract pointer from scalar
The only operands allowed on subtraction of pointers is pointer - pointer, or pointer - scalar. So, scalar - pointer is not allowed.
The following is an example of this error:
int i;
int *pi = &i;
ff(1 - pi); /* error */
E 104 left operand of operator has not struct/union
type
The first operand of a '.' or '->'
must have a struct or union type.
E 105 zero or negative array size - ignored
Array bound constants must be greater than zero. So,
char a[0]; is not allowed.
E 106 different constructors
Compatible function types with parameter type lists must agree in number of parameters and in use of ellipsis. Also, the corresponding parameters must have compatible types. This error is usually followed by informational message I 111. The following is an example of this error:
int f(int);
int f(int, int); /* error different
parameter list */
E 107 different array sizes
Corresponding array parameters of compatible function types must have the same size.This error is usually followed by informational message I 111. The following is an example of this error:
int f(int [][2]);
int f(int [][3]); /* error */
E 108 different types
Corresponding parameters must have compatible types and the type of each prototype parameter must be compatible with the widened definition parameter. This error is usually followed by informational message I 111. The following is an example of this error:
int f(int);
int f(long); /* error different type
in parameter list */
E 109 floating point constant out of valid range
A floating point constant must have a value that fits in the type
to which it was assigned. See section Data Types for the valid range of a floating point constant. The following is
an example of this error:
float d = 10E9999; /* error, too big */
E 110 function cannot return arrays or functions
A function may not have a return type that is of type array or function. A pointer to a function is allowed. The following are examples of
this error:
typedef int F(); F f(); /* error */
typedef int A[2]; A g(); /* error */
I 111 parameter list does not match earlier prototype
Check the parameter list or adjust the prototype. The number and type of parameters must match. This message is preceded by error E 106,
E 107 or E 108.
E 112 parameter declaration must include identifier
If the declarator is a prototype, the declaration of each parameter
must include an identifier. Also, an identifier declared as a
typedef name cannot be a parameter name. The following are examples of this error:
int f(int g, int) {return (g);} /* error */
typedef int int_type;
int h(int_type) {return (0);} /* error */
E 114 incomplete struct/union type
The struct
or union type
must be known before you can use it. The following is an example of this error:
extern struct unknown sa, sb;
sa = sb; /* 'unknown' does not have a
defined type */
The left side of an assignment (the lvalue) must be modifiable.
E 115 label "name" undefined
A goto statement
was found, but the specified label did not exist in the same function or module. The following is an example of this error:
f1() { a: ; } /* W 116 */
f2() { goto a; } /* error, label 'a:' is
not defined in f2() */
W 116 label "name" not referenced
The given label was defined but never referenced. The reference of
the label must be within the same function or module. The following is
an example of this warning:
f() { a: ; } /* 'a' is not referenced */
E 117 "name" undefined
The specified identifier was not defined. A variable's type must be specified in a declaration before it can be used. This error can also
be the result of a previous error. The following is an example of this error:
unknown i; /* error, 'unknown' undefined */
i = 1; /* as a result, 'i' is also
undefined */
W 118 constant expression out of valid range
A constant expression used in a case label may not be too large. Also when converting a floating point value to an integer, the floating
point constant may not be too large. This warning is usually preceded by error E 16 or E 109. The following is an example of this warning:
int i = 10E88; /* error and warning */
E 119 cannot take 'sizeof' bitfield or void type
The size of a bit field or void type is not known. So, the size of it cannot be taken.
E 120 cannot take 'sizeof' function
The size of a function is not known. So, the size of it cannot be
taken.
E 121 not a function declarator
This is not a valid function. This may be due to a previous error.
The following is an example of this error:
int f() return 0; /* missing '{ }' */
int g() { } /* error, 'g' is not a
formal parameter and
therefore, this is not a
valid function declaration */
E 122 unnamed formal parameter
The parameter must have a valid name.
W 123 function should return something
A return in
a non-void
function must have an expression.
E 124 array cannot hold functions
An array of functions is not allowed.
E 125 +function cannot return anything
A return with
an expression may not appear in a void function.
W 126 missing return (function "name")
A non-void
function with a non-empty function body must have a return statement.
E 129 cannot initialize "name"
Declarators in the declarator list may not contain initializations.
Also, an extern declaration
may have no initializer. The following are examples of this error:
{ extern int i = 0; } /* error */
int f( i ) int i=0; /* error */
W 130 operands of operator are pointers
to different types
Pointer operands of an operator or assignment ('='), must have the same type. For example, the following code generates this warning:
long *pl;
int *pi = 0;
pl = pi; /* warning */
E 131 bad operand type(s) of operator
The operator needs an operand of another type. The following is an example of this error:
int *pi;
pi += 1.; /* error, pointer on left; needs
integral value on right */
W 132 value of variable "name" is undefined
This warning occurs if a variable is used before it is defined. For example, the following code generates this warning:
int a,b;
a = b; /* warning, value of b unknown */
E 133 illegal struct/union member type
A function cannot be a member of a struct or union. Also, bit fields may only have type int or unsigned.
E 134 bitfield size out of range - set to 1
The bit field width may not be greater than the number of bits in
the type and may not be negative. The following example generates this error:
struct i { unsigned i : 999; }; /* error */
W 135 statement not reached
The specified statement will never be executed. This is for example
the case when statements are present after a return.
E 138 illegal function call
You cannot perform a function call on an object that is not a function. The following example generates this error:
int i, j;
j = i(); /* error, i is not a function */
E 139 operator cannot have aggregate
type
The type name in a (cast) must be a scalar (not a
struct,
union or a pointer) and also the operand of a (cast) must be a scalar. The following are examples of this error:
static union ui {int a;} ui ;
ui = (union ui)9; /* cannot cast to union */
ff( (int)ui ); /* cannot cast a union
to something else */
E 140 type cannot be applied to a register/bit/bitfield
object or builtin/inline function
For example, the '&' operator (address) cannot be used on registers and bit fields. So, func(&r6); and func(&bitf.a); are invalid.
E 141 operator requires modifiable lvalue
The operand of the '++', or '--' operator and the left operand of
an assignment or compound assignment (lvalue) must be modifiable. The following is an example of this error:
const int i = 1;
i = 3; /* error, const cannot be
modified */
E 143 too many initializers
There may be no more initializers than there are objects. The following is an example of this error:
static int a[1] = {1, 2}; /* error,
only one object can be initialized */
W 144 enumerator "name" value out of range
An enum constant
exceeded the limit for an int. The following is an example of this warning:
enum { A = INT_MAX, B }; /* warning,
B does not fit in an int anymore */
E 145 requires enclosing curly braces
A complex initializer needs enclosing curly braces. For example,
int a[] = 2; is not valid, but int a[] = {2}; is.
E 146 argument #number: memory spaces do not
match
With prototypes, the memory spaces of arguments must match.
W 147 argument #number: different
levels of indirection
With prototypes, the types of arguments must be assignment compatible. The following code generates this warning:
int i; void func(int,int);
func( 1, &i ); /* warning, argument 2 */
W 148 argument #number: struct/union type does
not match
With prototypes, both the prototyped function argument and the actual argument was a struct or union., but they have different tags. The tag types should match. The following is an example of this warning:
f(struct s); /* prototype */
main()
{
struct { int i; } t;
f( t ); /* t has other type than s */
}
E 149 object "name" has zero size
A struct or
union may
not have a member with an incomplete type. The following is an example of this error:
struct { struct unknown m; } s; /* error */
W 150 argument #number: pointers to different
types
With prototypes, the pointer types of arguments must be compatible. The following example generates this warning:
int f(int*);
long *l;
f(l); /* warning */
W 151 ignoring memory specifier
Memory specifiers for a struct, union or enum are ignored.
E 152 operands of operator are not pointing
to the same memory space
Be sure the operands point to the same memory space. This error occurs, for example, when you try to assign a pointer to a pointer
from a different memory space.
E 153 'sizeof' zero sized object
An implicit or explicit sizeof operation references an object with an unkown size. This error is usually preceded by error E 119 or E 120, cannot take 'sizeof'.
E 154 argument #number: struct/union mismatch
With prototypes, only one of the prototyped function argument or the actual argument was a struct or union. The types should match. The following is an example of this error:
f(struct s); /* prototype */
main()
{
int i;
f( i ); /* i is not a struct */
}
E 155 casting lvalue 'type' to 'type'
is not allowed
The operand of the '++', or '--' operator or the left operand of an assignment or compound assignment (lvalue) may not be cast to another type. The following is an example of this error:
int i = 3;
++(unsigned)i; /* error, cast expression
is not an lvalue */
E 157 "name" is not a formal parameter
If a declarator has an identifier list, only its identifiers may appear
in the declarator list. The following is an example of this error:
int f( i ) int a; /* error */
E 158 right side of operator is not a member
of the designated struct/union
The second operand of '.' or '->' must be a member
of the designated struct or
union.
E 160 pointer mismatch at operator
Both operands of operator must be a valid pointer.
The following example generates this error:
int *pi = 44; /* right side not a pointer */
E 161 aggregates around operator
do not match
The contents of the structs, unions or arrays on both sides of the operator must be the same. The following example causes
this error:
struct {int a; int b;} s;
struct {int c; int d; int e;} t;
s = t; /* error */
E 162 operator requires an lvalue or function
designator
The '&' (address) operator requires an lvalue or function designator. The following is an example of this error:
int i;
i = &( i = 0 );
W 163 operands of operator have different level
of indirection
The types of pointers or addresses of the operator must be assignment compatible. The following is an example of this warning:
char **a;
char *b;
a = b; /* warning */
E 164 operands of operator may not have type
'pointer to void'
The operands of operator may not have operand
(void *).
W 165 operands of operator are incompatible:
pointer vs. pointer to array
The types of pointers or addresses of the operator must be assignment compatible. A pointer cannot be assigned to a pointer to array. The following is an example of this warning:
main()
{
typedef int array[10];
array a;
array *ap = a; /* warning */
}
E 166 operator cannot make something out of
nothing
Casting type void to something else is not allowed. The following example generates this error:
void f(void);
main()
{
int i;
i = (int)f(); /* error */
}
E 170 recursive expansion of inline function "name"
An _inline
function may not be recursive. The following example generates this error:
_inline int a (int i)
{
a(i); /* recursive call */
return i;
}
main()
{
a(1); /* error */
}
E 171 +too much tail-recursion in inline function "name"
If the function level is greater than or equal to 40 this error is
given. The following example generates this error:
_inline void a ()
{
a();
}
main()
{
a();
}
W 172 adjacent strings have different types
When concatenating two strings, they must have the same type. The following example generates this warning:
char b[] = L"abc""def"; /* strings have
different types */
E 173 'void' function argument
A function may not have an argument with type void.
E 174 not an address constant
A constant address was expected. Unlike a static variable, an automatic variable does not have a fixed memory location and therefore, the address of an automatic is not a constant. The following is an example of this error:
int *a;
static int *b = a; /* error */
E 175 not an arithmetic constant
In a constant expression no assignment operators, no '++' operator,
no '--' operator and no functions are allowed. The following is an example of this error:
int a;
static int b = a++; /* error */
E 176 address of automatic is not a constant
Unlike a static variable, an automatic variable does not have a fixed memory location and therefore, the address of an automatic is not
a constant. The following is an example of this error:
int a; /* automatic */
static int *b = &a; /* error */
W 177 static variable "name" not used
A static variable is declared which is never used. To eliminate this warning remove the unused variable.
W 178 static function "name" not used
A static function is declared which is never called. To eliminate
this warning remove the unused function.
E 179 +inline function "name" is not defined
Possibly only the prototype of the inline function was present, but
the actual inline function was not. The following is an example of this error:
_inline int a(void); /* prototype */
main()
{
int b;
b = a(); /* error */
};
E 180 illegal target memory (memory) for pointer
The pointer may not point to memory. For example, a
pointer to bitaddressable memory is not allowed.
E 181 invalid cast to function
A cast to type function is not allowed. A cast to a function pointer
type is allowed.
W 182 argument #number: different types
With prototypes, the types of arguments must be compatible.
W 183 variable 'name' possibly uninitialized
Possibly an initialization statement is not reached, while a function should return something. The following is an example of this warning:
int a;
int f(void)
{
int i;
if ( a )
{
i = 0; /* statement not reached */
}
return i; /* warning */
}
W 184 empty pragma name in -z option - ignored
The -z option requires a pragma name.
I 185 (prototype synthesized at line number
in "name")
This is an informational message containing the source file position where an old-style prototype was synthesized. This message is preceded by error E 146, W 147, W 148, W 150, E 154, W 182 or E 203.
E 186 array of type bit is not allowed
An array cannot contain bit type variables.
E 187 illegal structure definition
A structure can only be defined (initialized) if its members are known. So, struct unknown s = { 0 }; is not allowed.
E 188 structure containing bit-type fields is forced into
bitaddressable area
This error occurs when you use a bitaddressable storage type for a structure containing bit-type members.
E 189 pointer is forced to bitaddressable, pointer to bitaddressable
is illegal
A pointer to bitaddressable memory is not allowed.
W 190 "long float" changed to "float"
In ANSI C floating point constants are treated having type
double, unless the constant has the suffix 'f'. If you have specified an option
to use float constants, a long floating point constant such as 123.12fl is changed to a float.
E 191 recursive struct/union definition
A struct or
union cannot
contain itself. The following example generates this error:
struct s { struct s a; } b; /* error */
E 192 missing filename after -f option
The -f option requires a filename argument.
E 194 cannot initialize typedef
You cannot assign a value to a typedef variable. So,
typedef i=2; is not allowed.
W 195 constant expression out of range -- truncated
The resulting constant expression is too large to fit in the specified
data type. The value is truncated. The following example generates this warning:
int i = 140000L; /* warning, value is too large
to fit in an int */
W 196 constant expression out of range due to signed/unsigned
type mismatch
The resulting constant expression is too large to fit in the specified
data type. The following example generates this warning:
int i = 40000U; /* the unsigned value is too large
to fit in a signed int */
/* unsigned int i = 40000U; is OK */
W 197 unrecognized -w argument: argument
The -w option only accepts a warning number or the
text 'strict' as an argument. See the description of the -w option for details.
W 198 trigraph sequence replaced
Trigraphs are used in the C language to create special characters
on obsolete terminals with a limited character set. When they are replaced in your source, e.g. in a string, they may give rise to very obscure errors.
F 199 demonstration package limits exceeded
The demonstration package has certain limits which are not present
in the full version. Contact TASKING for a full version.
W 200 unknown pragma "name" - ignored
The compiler ignores pragmas that are not known. For example, #pragma unknown.
W 201 name cannot have storage type - ignored
A register
variable or an automatic/parameter cannot have a storage type. To eliminate this warning, remove the storage type or place
the variable outside a function.
E 202 'name' is declared with 'void' parameter
list
You cannot call a function with an argument when the function does not accept any (void parameter list). The following is an example of this error:
int f(void); /* void parameter list */
main()
{
int i;
i = f(i); /* error */
i = f(); /* OK */
}
E 203 too many/few actual parameters
With prototyping, the number of arguments of a function must agree with the protoype of the function. The following is an example of
this error:
int f(int); /* one parameter */
main()
{
int i;
i = f(i,i); /* error, one too many */
i = f(i); /* OK */
}
W 204 U suffix not allowed on floating constant - ignored
A floating point constant cannot have a 'U' or 'u' suffix.
W 205 F suffix not allowed on integer constant - ignored
An integer constant cannot have a 'F' or 'f' suffix.
E 206 'name' named bit-field cannot have 0
width
A bit field must be an integral contstant expression with a value
greater than zero.
E 207 list of rule numbers expected after "-safer" option
Add the numbers of the Safer C rules to the -safer option to specifiy the rules that must be checked. See Appendix B
Safer C
W 208 unsupported Safer C rule number number.
Specified Safer C rule number is not supported.
E 209 +Safer C rule number violation: rule_description
A specified Safer C rule is violated.
E 212 "name": missing static function
definition
A function with a static prototype misses its definition.
W 213 invalid string/character constant in non-active part
of source
This part of the source is skipped.
E 214 second occurrence of #pragma asm or asm_noflush
#pragma asm/#pragma endasm blocks cannot be nested. Use #pragma endasm before starting a new #pragma asm/#pragma endasm block.
E 215 "#pragma endasm" without a "#pragma asm"
A #pragma endasm must always have a corresponding
#pragma asm or #pragma asm_noflush.
W 216 suggest parentheses around assignment used as truth
value
Generated when the argument of an if statement is actually an assignment (might indicate a typing error).
W 303 variable 'name' uninitialized
Possibly an initialization statement is not reached, while a function should return something. The following is an example of this warning:
int a;
int f(void)
{
int i;
if ( a )
{
i = 0; /* statement not reached */
}
return i; /* warning */
}
E 327 too many arguments to pass in registers for _asmfunc
'name'
An _asmfunc
function uses a fixed register-based interface between C and assembly, but the number of arguments that can be passed is limited by the number of available registers. With function name this limit was reached.
Backend
W 501 function qualifier used on non-function
A function qualifier can only be used on functions.
W 502 force jump table for switch statements (-Ot) ignored:
jump table would exceed 64K
The jump table will be too large,
W 508 duplicate function qualifier - 'name'
ignored
Only one function qualifier is allowed. Duplicate function qualifiers
are ignored.
E 509 illegal interrupt offset, specify -ivo=<value>
E 510 base-address of interrupt vectors must have 4-byte alignment
XA interrupt vectors are aligned at 4-byte.
E 511 interrupt function must have void result and void parameter
list
A function declared with _interrupt(n) cannot accept any arguments and cannot return anything.
W 512 'number' illegal '_interrupt' vector
number (-1, or 0 to 70) - ignored
The interrupt vector number must be -1 or in the range 0 to 70. Any other number is illegal.
E 513 calling an _interrupt routine, use '_intxa()'
An interrupt function cannot be called directly, you must use the intrinsic function _intxa().
E 514 conflict in 'function_qualifier' attribute
The attributes of the current function qualifier declaration and the previous function qualifier declaration are not the same.
E 515 different 'function_qualifier' number(s)
The function prototype of an interrupt service routine must have the same vector number and using numbers as in the function definition.
E 516 'memory_type' is illegal memory for function
The storage type is not valid for this function.
W 517 conversion of long address to short address
This warning is issued when pointer conversion is needed, for example, when you assign a _huge pointer to a _near pointer.
E 519 interrupt function not supported for User Mode only
applications
An interrupt service routine should be part of a System mode application. System mode resources, like the system stack, are used when an interrupt is serviced. System mode resources like the system stack are not used in a User mode only application.
E 522 function automatic(s) and/or temporary storage occupy
more stack space than the available 64K
The amount of automatic variables allocated on the stack exceed the maximum stack size of the XA. Reduce the number of automatic variables in your application.
F 524 illegal memory model
See the compiler usage for valid arguments of the -M
option.
W 525 not saving register name in interrupt
frame can lead to run-time errors
You can use _frame to specify that the register should be saved.
E 526 function qualifier '_asmfunc' not allowed in function
definition
_asmfunc is
only allowed in the function protoptype.
E 527 illegal frame register name, only R0..R6,DS,CS,ES
and SSEL are allowed
_frame can
only accept the registers R0..R6,DS,CS,ES and SSEL.
E 528 _at() requires a numerical address
You can only use an expression that evaluates to a numerical address.
E 529 _at() address out of range for this type of object
The absolute address is not present in the specified memory space.
E 530 _at()/_atbit() only valid for global variables
Only global variables can be placed on absolute addresses.
E 531 _at()/_atbit() only allowed for uninitialized variables
Absolute variables cannot be initialized.
E 532 _at() has no effect on external declaration
When declared extern the variable is not allocated by the compiler.
W 533 cxa language extension keyword used as identifier
A language extension keyword is a reserved word, and reserved words cannot be used as an identifier.
E 534 memory_space section name
exceed max section size of size
The variables allocated do not fit in the XA address space. Reduce
the amount of variables qualified with memory_space in
your application.
W 535 variable name needs alignment to an even
address
Specify an even address to _at.
W 536 superfluous function qualifier for Page Zero memory
models - '_pagezero' ignored
It is only useful to use _pagezero to force interrupt service routines in Large Memory mode models to be located in Page Zero.
E 538 '_trap' is not allowed with '_interrupt()'
Use _trap
on 'normal' functions to indicate that the function is called by a software trap instruction.
E 539 different '_interrupt' or '_trap' number(s)
The function prototype of an interrupt service routine or trap function must have the same vector number and using numbers as in the function definition.
E 540 not allowed to indirect call a _trap function
An _trap function
is to be called by a software trap instruction.
W 541 User mode application should not contain software trap
function definitions
A software trap routine should be part of a System mode application. System mode resources, like the system stack, are used when a software trap routine is serviced. System mode resources like the system stack are not used in a User mode only application.
W 542 optimization stack underflow, no optimization options
are saved with #pragma optimize
This warning occurs if you use a #pragma endoptimize while there were no options saved by a previous #pragme optimize.
W 543 User/Trace mode is enabled in interrupt service
routine
The _using
function qualifier contains a PSW value which defines the interrupt service routine to run in User mode. This warning is generated because interrupt service routines will normally be executed in System mode.
E 544 'memory' not supported by SmartXA cpu,
converted to 'memory'
It is not allowed to use _xdat, because there is no external memory available on the SmartXA.
E 545 maximum interrupt number is number
An interrupt number must be in the range 0 to 70 or -1.
E 546 24-bit data access is not allowed for SmartXA user mode applications
Only 16-bit segment based data access is possible in SmartXA user mode. The segment register DS and ES are only accessible from System mode. Avoid the use of _huge data access in your application.
E 547 Large memory model does not support SmartXA user mode applications
24-bit data access is not allowed for SmartXA user mode applications, which is explicitly used in the Large memory model.
E 548 CPU mode independent applications are not supported
on SmartXA
Due to the SmartXA architecture it is not possible to generate code which runs in User mode and System mode.
E 549 _sfrbyte/_sfrbit (name) declared without
'_at()'/'_atbit()'
An _sfrbyte
object must be declared with _at(). An _sfrbit object must be declared with _atbit() on a _sfrbyte object.
E 551 first/second operand of function() is
not pointing to name memory space
The first operand of _strmovc(), _strmovx(), _memmovc() and _memmovx()
must point to _far. The second operand of _strmovc() and _memmovc() must point to _rom. The second operand of _strmovx()
and _memmovx() must point to _xdat.
E 552 'name' is not bitaddressable
The intrinsic functions _getbit() and _putbit() can only be used on a bitaddressable _bitbyte symbol.
E 553 bitoffset for 'name' must be a constant
value between 0 and 7
Bit offsets start with 0 for the first bit in a byte and end with
7 for the last bit in a byte.
F 554 illegal memory type specified
The memory type specified to the -R option or #pragma renamesec is invalid.
E 555 '_name()' without '_interrupt()' or '_trap()'
_pagezero
and _using
must always be used in combination with _interrupt
or _trap.
E 556 interrupt with vector number number can
only be activated by hardware
Interrupts with vector numbers in the range 2 to 15 or the range 32
to 63 (32 event interrupts vectors) can only be activated by hardware.
E 557 special function register 'name' not
defined, use _sfrbyte/_sfrbit
Use _sfrbyte
to define a special function register or use _sfrbit to define a bit in an SFR.
E 558 argument #number is not an integral constant
expression
The first argument of _intxa() is not a constant value, or the second argument of a logical/arithmetic left/right shift (shift count) is
not a constant value.
E 562 bit type parameter not allowed
Parameters cannot be of type _bit.
E 563 number of '_interrupt()' parameters not equal to '_using()' parameters
The number of interrupt vector numbers must be equal to the number of PSW value, because a vector entry is built of the vector address
and the PSW value.
E 564 '_trap()' without '_using()'
'_interrupt()' without '_using()'
'_frame()' without '_interrupt()'
Both function qualifiers must be used.
W 565 '_huge' not allowed in this memory model, converted
to '_far'
_huge is only
allowed in the medium or large memory model.
E 566 special function registers may not be initialized
For example, the construction _sfrbyte a = 2; is not allowed.
E 567 _atbit() only possible on objects, not on constant addresses
Use _atbit()
to define bit variables within a _bitbyte or _sfrbyte variable with a previously defined name.
E 568 _atbit() only valid for global variables
Only global variables can be placed on absolute addresses.
E 569 'offset' must be a constant value between 0 and 15
With _atbit() you can specify a bit offset within a
_bitbyte or _sfrbyte from
0 to 15.
E 570 _atbit() only possible for _bit/_sfrbit objects
Ony _bit and
_sfrbit objects
can be declared with _atbit().
E 571 _atbit() only possible on _bitbyte/_sfrbyte objects
_atbit() only
accepts _bitbyte or _sfrbyte objects as an argument.
E 572 specified object not BIT-addressable
The object specified to _atbit() must be a _bitbyte or _sfrbyte object.
E 573 _atbit() object must have same storage as target object
The storage class of both _atbit() objects must be the same.
E 574 _sfrbit object can only have _atbit() on a _sfrbyte
object
_bit object can only have _atbit() on a _bitbyte object
You cannot specify a _sfrbit object with _atbit() on a _bitbyte object, and you cannot specify a _bit object with _atbit() on a _sfrbyte object.
E 575 '_edata' only supported by SmartXA cpu in
System mode
The EEPROM data space is only supported by the SmartXA derivative running in System mode.
W 576 conversion from larger '_rom' to smaller '_edata' address
space, address is truncated.
The address space of the EEPROM mapped in ROM is smaller than the _rom address
space. When converting a _rom address to an eeprom address, the address is truncated to fit the EEPROM address space.
W 577 Code group 'CS' needs to be located in EEPROM address
space
_rom_cs,
_rom_pcn and edata pointers have equal size for SmartXA in Large memory mode, but the address space of edata is smaller than that for _rom_cs and _rom_pcn address spaces. Also, it is not known if CS is pointing to the mapped EEPROM in ROM or if the program counter is pointing to the mapped EEPROM in ROM. You must ensure that at the locate stage CS is pointing to the mapped EEPROM.
W 578 conversion of '_generic' pointer with 24-bit arithmetic
to '_far' pointer with 16-bit arithmetic.
Converting from a pointer to a pointer with a smaller arithmetic may lead to run-time errors when the large arithmetic is used for accessing the object.
For example: a _huge long object can be located over a segment boundary which requires 24-bit pointer arithmetic. When you try to access the object with a _far pointer using 16-bit arithmetic, you will fail, because the _far pointer will wrap.
E 579 _generic storage type specifier is only allowed in
the logical type of a pointer
This error is reported when the _generic keyword is used as a storage type qualifier or when it is used as a logical type for non-pointer objects like a function return type.
The following is an example of an erroneous object declaration. An object cannot be storage qualified to be located in memory on the
code bus and data bus.
int _generic i;
E 580 '_generic' not supported by SmartXA cpu running
in user mode
Generic pointer support is not available for SmartXA applications running in user mode, because DS and ES segment register access is not allowed.
W 581 storage space information loss on conversion from '_generic'
to '_far'
The storage space information contained by the
_generic pointer
is lost when converting to any other pointer type.
W 582 Deprecated: option '-Ad' is replaced by option '-Td'
The option -Ad is replaced by the option -Td.
The option -Ad should not be used anymore, use -Td instead.
W 583 Deprecated: option '-Au' has become obsolete
The option -Au has became obsolete and should not
be used anymore.
E 584 absolute variable name exceeds boundary space address boundary
Variables must fit within blocks of 64k. With the _at keyword an absolute variable was placed in such a way that its size exceeds a
64k boundary.
Copyright © 2000 TASKING, Inc.