mirror of
https://github.com/siemens-mobile-hacks/vbcc.git
synced 2026-11-25 22:27:36 +00:00
1399 lines
37 KiB
Text
1399 lines
37 KiB
Text
@item "declaration expected" (Fatal, Error, ANSI-violation)
|
|
|
|
Something is pretty wrong with the source.
|
|
|
|
|
|
@item "only one input file allowed" (Fatal)
|
|
|
|
vbcc accepts only a single filename to compile. You can use a
|
|
frontend to compile multiple files or perhaps you mistyped an
|
|
option.
|
|
|
|
|
|
@item "Flag <%s> specified more than once" ()
|
|
|
|
You specified a command line option that should be specified only
|
|
once more than once. Maybe you have this option in your config-file
|
|
and used it in the command line, too?
|
|
The first occurrence will override the latter ones.
|
|
|
|
|
|
@item "Flag <%s> needs string" (Fatal)
|
|
|
|
This option hast to be specified with a string parameter, e.g.
|
|
-flag=foobar
|
|
|
|
|
|
@item "Flag <%s> needs value" (Fatal)
|
|
|
|
This option hast to be specified with an integer parameter, e.g.
|
|
-flag=1234
|
|
|
|
|
|
@item "Unknown Flag <%s>" (Fatal)
|
|
|
|
This option is not recognized by vbcc. Perhaps you mistyped it, used
|
|
the wrong case or specified an option of the frontend to vbcc?
|
|
|
|
|
|
@item "No input file" (Fatal)
|
|
|
|
You did not specify an input file. Your source file should not start
|
|
with a '-' and if you use a frontend make sure it has the proper
|
|
suffix.
|
|
|
|
|
|
@item "Could not open <%s> for input" (Fatal)
|
|
|
|
A file could not be opened.
|
|
|
|
|
|
@item "need a struct or union to get a member" (Error, ANSI-violation)
|
|
|
|
The source contains something like a.b where a is not a structure
|
|
or union.
|
|
|
|
|
|
@item "too many (%d) nested blocks" (Fatal, Error)
|
|
|
|
vbcc only allows a maximum number of nested blocks
|
|
(compund-statements). You can increase this number by changing
|
|
the line #define MAXN <something> in vbc.h and recompiling vbcc.
|
|
|
|
|
|
@item "left block 0" (Error, ANSI-violation)
|
|
|
|
This error should not occur.
|
|
|
|
|
|
@item "incomplete struct <%s>" (Error, ANSI-violation)
|
|
|
|
You tried to get a member of an incomplete structure/union.
|
|
You defined struct x y; somewhere without defining struct x@{...@}.
|
|
|
|
|
|
@item "out of memory" (Fatal, Error)
|
|
|
|
Guess what.
|
|
|
|
|
|
@item "redeclaration of struct <%s>" (Error, ANSI-violation)
|
|
|
|
You may not redeclare a struct/union in the same block.
|
|
|
|
|
|
@item "incomplete type (%s) in struct" (Error, ANSI-violation)
|
|
|
|
Every member in a struct/union declaration must be complete.
|
|
Perhaps you only wanted a pointer to that type and forgot the '*'?
|
|
|
|
|
|
@item "function (%s) in struct/union" (Error, ANSI-violation)
|
|
|
|
Functions cannot be members of structs/unions.
|
|
|
|
|
|
@item "redeclaration of struct/union member <%s>" (Error, ANSI-violation)
|
|
|
|
Two members of a struct/union have the same name.
|
|
|
|
|
|
@item "redeclaration of <%s>" (Error, ANSI-violation)
|
|
|
|
You used a name already in use in an enumeration.
|
|
|
|
|
|
@item "invalid constant expression" (Error, ANSI-violation)
|
|
|
|
??? Nowhere to find...
|
|
|
|
|
|
@item "array dimension must be constant integer" (Error, ANSI-violation)
|
|
|
|
The dimensions of an array must be constants (real constants,
|
|
const int x=100; int y[x]; is not allowed) and integers
|
|
(int y[100.0]; is not allowed either).
|
|
|
|
|
|
@item "no declarator and no identifier in prototype" (Error, ANSI-violation)
|
|
|
|
|
|
|
|
@item "invalid storage-class in prototype" (Error, ANSI-violation)
|
|
|
|
Function parameters may only be auto or register.
|
|
|
|
|
|
@item "void not the only function argument" (Error, ANSI-violation)
|
|
|
|
You tried to declare a function that has an argument of type void
|
|
as well as other arguments.
|
|
|
|
|
|
@item "<%s> no member of struct/union" (Error, ANSI-violation)
|
|
|
|
The struct/union does not contain a member called like that.
|
|
|
|
|
|
@item "increment/decrement is only allowed for aithmetic and pointer types" (Error, ANSI-violation)
|
|
|
|
|
|
|
|
@item "functions may not return arrays or functions" (Error, ANSI-violation)
|
|
|
|
|
|
|
|
@item "only pointers to functions can be called" (Error, ANSI-violation)
|
|
|
|
You tried to call something that did not decay into a pointer to
|
|
a function.
|
|
|
|
|
|
@item "redefinition of var <%s>" (Error, ANSI-violation)
|
|
|
|
|
|
|
|
@item "redeclaration of var <%s> with new storage-class" (Error, ANSI-violation)
|
|
|
|
|
|
|
|
@item "first operand of conditional-expression must be arithmetic or pointer type" (Error, ANSI-violation)
|
|
|
|
|
|
|
|
@item "multiple definitions of var <%s>" (Error, ANSI-violation)
|
|
|
|
There have been multiple definitions of a global variable with
|
|
initialization.
|
|
|
|
|
|
@item "operands of : do not match" (Error, ANSI-violation)
|
|
|
|
In an expression of the form a ? b : c
|
|
- a and b must have the same type or
|
|
- a and b both must have arithmetic types or
|
|
- one of them must be a pointer and the other must be void * or 0
|
|
|
|
|
|
@item "function definition in inner block" (Error, ANSI-violation)
|
|
|
|
C does not allow nested functions.
|
|
|
|
|
|
@item "redefinition of function <%s>" (Error, ANSI-violation)
|
|
|
|
Defining two functions with the same name in one translation-unit
|
|
is no good idea.
|
|
|
|
|
|
@item "invalid storage-class for function" (Error, ANSI-violation)
|
|
|
|
Functions must not have storage-classes register or auto.
|
|
|
|
|
|
@item "declaration-specifiers expected" (Error, ANSI-violation)
|
|
|
|
|
|
|
|
@item "declarator expected" (Error, ANSI-violation)
|
|
|
|
|
|
|
|
@item "<%s> is no parameter" (Error, ANSI-violation)
|
|
|
|
In an old-style function definition you tried to declare a name as
|
|
parameter which was not in the identifier-list.
|
|
|
|
|
|
@item "assignment of different structs/unions" (Error, ANSI-violation)
|
|
|
|
|
|
|
|
@item "invalid types for assignment" (Error, ANSI-violation)
|
|
|
|
In an assignment-context (this includes passing arguments to
|
|
prototyped functions) the source and target must be one of the
|
|
following types:
|
|
|
|
- both are arithmetic types
|
|
- both are the same struct/union
|
|
- one of them is a pointer to void and the other one is any pointer
|
|
- the target is any pointer and the source is an integral
|
|
constant-expression with the value 0
|
|
- both are pointer to the same type (here the target may have
|
|
additional const/volatile qualifiers - not recursively, however)
|
|
|
|
Any other combinations should be illegal.
|
|
|
|
|
|
@item "only 0 can be compared against pointer" (Warning, ANSI-violation)
|
|
|
|
You may not compare a pointer against any other constant but a
|
|
0 (null pointer).
|
|
|
|
|
|
@item "pointers do not point to the same type" (Warning, ANSI-violation)
|
|
|
|
You tried to compare or assign pointers that point to different
|
|
types. E.g. the types they point to may have different attributes.
|
|
|
|
|
|
@item "function initialized" (Error, Fatal, ANSI-violation)
|
|
|
|
There was a '=' after a function declaration.
|
|
|
|
|
|
@item "initialization of incomplete struct" (Error, Fatal, ANSI-violation)
|
|
|
|
A structure is incomplete if the only its name, but not the
|
|
content is known. You cannot do much with such structures.
|
|
|
|
|
|
@item "initialization of incomplete union" (Error, Fatal, ANSI-violation)
|
|
|
|
A union is incomplete if the only its name, but not the
|
|
content is known. You cannot do much with such unions.
|
|
|
|
|
|
@item "empty initialization" (Error, ANSI-violation)
|
|
|
|
There was no valid expression after the '=' in a variable definition.
|
|
|
|
|
|
@item "initializer not a constant" (Error, ANSI-violation)
|
|
|
|
Static variables and compound types may only be initialized with
|
|
constants.
|
|
Variables with const qualifier are no valid constant-expressions
|
|
here.
|
|
|
|
Addresses of static variables are ok, but casting them may turn
|
|
them into non-constant-expressions.
|
|
|
|
|
|
@item "double type-specifier" (Warning, ANSI-violation)
|
|
|
|
|
|
|
|
@item "illegal type-specifier" (Warning, ANSI-violation)
|
|
|
|
|
|
|
|
@item "multiple storage-classes" (Warning, ANSI-violation)
|
|
|
|
|
|
|
|
@item "storage-class specifier should be first" (Warning, ANSI-violation)
|
|
|
|
|
|
|
|
@item "bitfields must be ints" (Warning, ANSI-violation)
|
|
|
|
|
|
|
|
@item "bitfield width must be constant integer" (Warning, ANSI-violation)
|
|
|
|
|
|
|
|
@item "struct/union member needs identifier" (Warning, ANSI-violation)
|
|
|
|
|
|
|
|
@item "; expected" (Warning, ANSI-violation)
|
|
|
|
Probably you forgot a ';' or there is a syntactic error in an
|
|
expression.
|
|
|
|
|
|
@item "struct/union has no members" (Warning, ANSI-violation)
|
|
|
|
You defined an empty struct or union.
|
|
|
|
|
|
@item "@} expected" (Warning, ANSI-violation)
|
|
|
|
|
|
|
|
@item ", expected" (Warning, ANSI-violation)
|
|
|
|
|
|
|
|
@item "invalid unsigned" (Warning, ANSI-violation)
|
|
|
|
|
|
|
|
@item ") expected" (Warning, ANSI-violation)
|
|
|
|
|
|
|
|
@item "array dimension has sidefx (will be ignored)" (Warning, ANSI-violation)
|
|
|
|
|
|
|
|
@item "array of size 0 (set to 1)" (Warning, ANSI-violation)
|
|
|
|
ANSI C does not allow arrays or any objects to have a size of 0.
|
|
|
|
|
|
@item "] expected" (Warning, ANSI-violation)
|
|
|
|
|
|
|
|
@item "mixed identifier- and parameter-type-list" (Warning, ANSI-violation)
|
|
|
|
|
|
|
|
@item "var <%s> was never assigned a value" (Warning)
|
|
|
|
|
|
|
|
@item "var <%s> was never used" (Warning)
|
|
|
|
|
|
|
|
@item "invalid storage-class" (Warning, ANSI-violation)
|
|
|
|
|
|
|
|
@item "type defaults to int" (Warning)
|
|
|
|
|
|
|
|
@item "redeclaration of var <%s> with new type" (Warning, ANSI-violation)
|
|
|
|
|
|
|
|
@item "redeclaration of parameter <%s>" (Warning, ANSI-violation)
|
|
|
|
|
|
|
|
@item ": expected" (Warning, ANSI-violation)
|
|
|
|
|
|
|
|
@item "illegal escape-sequence in string" (Warning, ANSI-violation)
|
|
|
|
|
|
|
|
@item "character constant contains multiple chars" (Warning)
|
|
|
|
|
|
|
|
@item "could not evaluate sizeof-expression" (Error, ANSI-violation)
|
|
|
|
|
|
|
|
@item "" expected (unterminated string)" (Error, ANSI-violation)
|
|
|
|
|
|
|
|
@item "something wrong with numeric constant" (Error, ANSI-violation)
|
|
|
|
|
|
|
|
@item "identifier expected" (Fatal, Error, ANSI-violation)
|
|
|
|
|
|
|
|
@item "definition does not match previous declaration" (Warning, ANSI-violation)
|
|
|
|
|
|
|
|
@item "integer added to illegal pointer" (Warning, ANSI-violation)
|
|
|
|
|
|
|
|
@item "offset equals size of object" (Warning)
|
|
|
|
|
|
|
|
@item "offset out of object" (Warning, ANSI-violation)
|
|
|
|
|
|
|
|
@item "only 0 should be cast to pointer" (Warning)
|
|
|
|
|
|
|
|
@item "unknown identifier <%s>" (Error, ANSI-violation)
|
|
|
|
|
|
|
|
@item "too few function arguments" (Warning, ANSI-violation)
|
|
|
|
|
|
|
|
@item "division by zero (result set to 0)" (Warning, ANSI-violation)
|
|
|
|
|
|
|
|
@item "assignment of different pointers" (Warning, ANSI-violation)
|
|
|
|
|
|
|
|
@item "lvalue required for assignment" (Error, ANSI-violation)
|
|
|
|
|
|
|
|
@item "assignment to constant type" (Error, ANSI-violation)
|
|
|
|
|
|
|
|
@item "assignment to incomplete type" (Error, ANSI-violation)
|
|
|
|
|
|
|
|
@item "operands for || and && have to be arithmetic or pointer" (Error, ANSI-violation)
|
|
|
|
|
|
|
|
@item "bitwise operations need integer operands" (Error, ANSI-violation)
|
|
|
|
|
|
|
|
@item "assignment discards const" (Warning, ANSI-violation)
|
|
|
|
You assigned something like (const type *) to (type *).
|
|
|
|
|
|
@item "relational expression needs arithmetic or pointer type" (Error, ANSI-violation)
|
|
|
|
|
|
|
|
@item "both operands of comparison must be pointers" (Error, ANSI-violation)
|
|
|
|
You wrote an expression like a == b where one operand was a pointer
|
|
while the other was not. Perhaps a function is not declared correctly
|
|
or you used NULL instead of 0?
|
|
|
|
|
|
@item "operand needs arithmetic type" (Error, ANSI-violation)
|
|
|
|
|
|
|
|
@item "pointer arithmetic with void * is not possible" (Error, ANSI-violation)
|
|
|
|
Adding/subtracting from a pointer to void is not possible.
|
|
|
|
|
|
@item "pointers can only be subtracted" (Error, ANSI-violation)
|
|
|
|
You cannot add, multiply etc. two pointers.
|
|
|
|
|
|
@item "invalid types for operation <%s>" (Error, ANSI-violation)
|
|
|
|
|
|
|
|
@item "invalid operand type" (Error, ANSI-violation)
|
|
|
|
|
|
|
|
@item "integer-pointer is not allowed" (Error, ANSI-violation)
|
|
|
|
You may not subtract a pointer from an integer.
|
|
Adding an integer or subtracting it from a pointer is ok.
|
|
|
|
|
|
@item "assignment discards volatile" (Warning, ANSI-violation)
|
|
|
|
You assigned something like (volatile type *) to (type *).
|
|
|
|
|
|
@item "<<, >> and % need integer operands" (Error, ANSI-violation)
|
|
|
|
|
|
|
|
@item "casting from void is not allowed" (Error, ANSI-violation)
|
|
|
|
Casting something of type void to anything makes no sense.
|
|
|
|
|
|
@item "integer too large to fit into pointer" (Error, ANSI-violation)
|
|
|
|
You tried to assign an integer to a pointer that is too small to
|
|
hold the integer.
|
|
Note that assignment of pointers<->integers is never portable.
|
|
|
|
|
|
@item "only integers can be cast to pointers" (Error, ANSI-violation)
|
|
|
|
|
|
|
|
@item "invalid cast" (Error, ANSI-violation)
|
|
|
|
|
|
|
|
@item "pointer too large to fit into integer" (Error, ANSI-violation)
|
|
|
|
You tried to assign a pointer to an integer that is too small to
|
|
hold the pointer.
|
|
Note that assignment of pointers<->integers is never portable.
|
|
|
|
|
|
@item "unary operator needs arithmetic type" (Error, ANSI-violation)
|
|
|
|
|
|
|
|
@item "negation type must be arithmetic or pointer" (Error, ANSI-violation)
|
|
|
|
|
|
|
|
@item "complement operator needs integer type" (Error, ANSI-violation)
|
|
|
|
|
|
|
|
@item "pointer assignment with different qualifiers" (Warning, ANSI-violation)
|
|
|
|
You tried to assign a pointer to a pointer that points to a type
|
|
with different qualifiers (e.g. signed<->unsigned).
|
|
|
|
|
|
@item "dereferenced object is no pointer" (Error, ANSI-violation)
|
|
|
|
|
|
|
|
@item "dereferenced object is incomplete" (Error, ANSI-violation)
|
|
|
|
You tried to dereference a pointer to an incomplete object.
|
|
Either you had a pointer to an array of unknown size or a pointer
|
|
to a struct or union that was not (yet) defined.
|
|
|
|
|
|
@item "only 0 should be assigned to pointer" (Warning, ANSI-violation)
|
|
|
|
You may not assign constants other than a null pointer to any
|
|
pointer.
|
|
|
|
|
|
@item "typedef <%s> is initialized" (Warning, ANSI-violation)
|
|
|
|
|
|
|
|
@item "lvalue required to take address" (Error, ANSI-violation)
|
|
|
|
You can only get the address of an object, but not of expressions
|
|
etc.
|
|
|
|
|
|
@item "unknown var <%s>" (Error, ANSI-violation)
|
|
|
|
|
|
|
|
@item "address of register variables not available" (Error, ANSI-violation)
|
|
|
|
If a variable is declared as 'register' its address may not be
|
|
taken (no matter if the variable actually gets assigned to a
|
|
register).
|
|
|
|
|
|
@item "var <%s> initialized after 'extern'" (Warning)
|
|
|
|
|
|
|
|
@item "const var <%s> not initialized" (Warning)
|
|
|
|
A constant variable was not initialized in its definition.
|
|
As there is no other legal way to assign a value to a constant
|
|
variable this is probable an error.
|
|
|
|
|
|
@item "function definition after 'extern'" (Warning, ANSI-violation)
|
|
|
|
|
|
|
|
@item "return type of main is not int" (Warning, ANSI-violation)
|
|
|
|
main() should be defined as
|
|
|
|
int main(int argc, char **argv)
|
|
|
|
Especially the return type of main must be 'int' - 'void' is
|
|
not allowed by ANSI C.
|
|
|
|
|
|
@item "invalid storage-class for function parameter" (Warning, ANSI-violation)
|
|
|
|
Function parameters may only have 'auto' or 'register' as
|
|
storage-class. 'static' or 'extern' are not allowed.
|
|
|
|
|
|
@item "formal parameters conflict with parameter-type-list" (Warning, ANSI-violation)
|
|
|
|
|
|
|
|
@item "parameter type defaults to int" (Warning)
|
|
|
|
A function definition contains no explicit type specifier.
|
|
'int' will be assumed.
|
|
|
|
|
|
@item "no declaration-specifier, used int" (Warning, ANSI-violation)
|
|
|
|
A variable was declared/defined without a type specified.
|
|
This is not allowed in ANSI C (apart from functions).
|
|
|
|
|
|
@item "no declarator in prototype" (Warning, ANSI-violation)
|
|
|
|
|
|
|
|
@item "static var <%s> never defined" (Warning)
|
|
|
|
|
|
|
|
@item "@} expected" (Warning)
|
|
|
|
|
|
|
|
@item "left operand of comma operator has no side-effects" (Warning)
|
|
|
|
In an expression of the form a,b a has no side-effects and is
|
|
therefore superfluous.
|
|
|
|
|
|
@item "label empty" (Error, ANSI-violation)
|
|
|
|
There was a ':' without an identifier before it.
|
|
|
|
|
|
@item "redefinition of label <%s>" (Error, ANSI-violation)
|
|
|
|
The label was defined more than once in the same function.
|
|
Consider that labels can not be hidden in inner blocks.
|
|
|
|
|
|
@item "case without switch" (Error, ANSI-violation)
|
|
|
|
A case label was found outside of any switch-statements.
|
|
|
|
|
|
@item "case-expression must be constant" (Error, ANSI-violation)
|
|
|
|
The expression after 'case' must be constant.
|
|
|
|
|
|
@item "case-expression must be integer" (Error, ANSI-violation)
|
|
|
|
The expression after 'case' must be integer.
|
|
|
|
|
|
@item "empty if-expression" (Error, ANSI-violation)
|
|
|
|
There was no valid expression after 'if'.
|
|
|
|
|
|
@item "if-expression must be arithmetic or pointer" (Error, ANSI-violation)
|
|
|
|
The expression after 'if' must be arithmetic (i.e. an integer
|
|
or floating point type) or a pointer.
|
|
|
|
|
|
@item "empty switch-expression" (Error, ANSI-violation)
|
|
|
|
There was no valid expression after 'switch'.
|
|
|
|
|
|
@item "switch-expression must be integer" (Error, ANSI-violation)
|
|
|
|
The expression after 'switch' must be an integer.
|
|
|
|
|
|
@item "multiple default labels" (Error, ANSI-violation)
|
|
|
|
There was more than one default label in a switch-statement.
|
|
|
|
|
|
@item "while-expression must be arithmetic or pointer" (Error, ANSI-violation)
|
|
|
|
The expression after the 'while' must be arithmetic (i.e. an integer
|
|
or floating point type) or a pointer.
|
|
|
|
|
|
@item "empty while-expression" (Error, ANSI-violation)
|
|
|
|
There was no valid expression after 'while'.
|
|
|
|
|
|
@item "for-expression must be arithmetic or pointer" (Error, ANSI-violation)
|
|
|
|
The expression inside the 'for' must be arithmetic (i.e. an integer
|
|
or floating point type) or a pointer.
|
|
|
|
|
|
@item "do-while--expression must be arithmetic or pointer" (Error, ANSI-violation)
|
|
|
|
The expression after the 'while' must be arithmetic (i.e. an integer
|
|
or floating point type) or a pointer.
|
|
|
|
|
|
@item "goto without label" (Error, ANSI-violation)
|
|
|
|
'goto' must be followed by a label.
|
|
|
|
|
|
@item "continue not within loop" (Error, ANSI-violation)
|
|
|
|
'continue' is only allowed inside of loops.
|
|
Perhaps there are unbalanced '@{' '@}'.
|
|
|
|
|
|
@item "break not in matching construct" (Error, ANSI-violation)
|
|
|
|
'break' is only allowed inside of loops or switch-statements.
|
|
Perhaps there are unbalanced '@{' '@}'.
|
|
|
|
|
|
@item "label <%s> was never defined" (Error, ANSI-violation)
|
|
|
|
There is a goto to a label that was never defined.
|
|
|
|
|
|
@item "label <%s> was never used" (Warning)
|
|
|
|
You defined a label, but there is no goto that jumps to it.
|
|
|
|
|
|
@item "register %s not ok" (Warning)
|
|
|
|
There was an internal error (i.e. a bug in the compiler)!
|
|
Please report the error to vb@@compilers.de. Thanks!
|
|
|
|
|
|
@item "default not in switch" (Warning, ANSI-violation)
|
|
|
|
A default label that is not in any switch-statement was found.
|
|
Perhaps there are unbalanced '@{' '@}'.
|
|
|
|
|
|
@item "( expected" (Warning, ANSI-violation)
|
|
|
|
|
|
|
|
@item "loop eliminated" (Warning)
|
|
|
|
There was a loop that will never be executed (e.g. while(0)...)
|
|
and therefore the entire loop was eliminated.
|
|
I do not know any reason for such loops, so there is probably an
|
|
error.
|
|
|
|
|
|
@item "statement has no effect" (Warning)
|
|
|
|
There is a statement that does not cause any side-effects (e.g.
|
|
assignments, function calls etc.) and is therefore superfluous.
|
|
E.g. you might have typed a==b; instead of a=b;
|
|
|
|
|
|
@item "'while' expected" (Warning, ANSI-violation)
|
|
|
|
The 'while' in a do-while loop is missing.
|
|
|
|
|
|
@item "function should not return a value" (Warning)
|
|
|
|
You specified an argument to return although the function is
|
|
void. Declare the function as non-void.
|
|
|
|
|
|
@item "function should return a value" (Warning)
|
|
|
|
You did not specify an argument to return although the function
|
|
is not void. Declare the function as void or specify a return
|
|
value.
|
|
|
|
|
|
@item "@{ expected" (Warning, ANSI-violation)
|
|
|
|
|
|
|
|
@item "internal error %d in line %d of file %s !!" (Fatal, Error)
|
|
|
|
There was an internal error (i.e. a bug in the compiler)!
|
|
Please report the error to vb@@compilers.de. Thanks!
|
|
|
|
|
|
@item "there is no message number %d" (Fatal)
|
|
|
|
You tried to activate or suppress a message that does not exist.
|
|
|
|
|
|
@item "message number %d cannot be suppressed" (Fatal)
|
|
|
|
You cannot suppress a message that displays a real error,
|
|
ANSI-violation or another real problem.
|
|
Only 'harmless' warnings can be suppressed.
|
|
|
|
|
|
@item "implicit declaration of function <%s>" (Warning)
|
|
|
|
A function was called before it was declared and therefore
|
|
implicitly declared as
|
|
|
|
int function();
|
|
|
|
This should be avoided in new programs.
|
|
|
|
|
|
@item "function call without prototype in scope" (Warning)
|
|
|
|
When writing new programs it is probably sensible to use prototypes
|
|
for every function. If a function is called without a prototype in
|
|
scope this may cause incorrect type conversions and is usually an
|
|
error.
|
|
|
|
|
|
@item "#pragma used" (Warning)
|
|
|
|
Usage of #pragma should be avoided in portable programs.
|
|
|
|
|
|
@item "assignment in comparison context" (Warning)
|
|
|
|
The expression in an if-, for-, while- or do-while-statement
|
|
is an assignment, e.g.
|
|
|
|
if(i=0)...
|
|
|
|
This could an error, if you wanted if(i==0).
|
|
If you turned on this warning and want it to shut up for a
|
|
certain expression you can cast it to its type, e.g.
|
|
|
|
if((int)(i=0))...
|
|
|
|
Note that only assignments with '=' will be warned, not '+=' etc.
|
|
|
|
|
|
@item "comparison redundant because operand is unsigned" (Warning)
|
|
|
|
A comparison with an unsigned variable is redundant, because
|
|
the result will always be constant, e.g.
|
|
|
|
unsigned int i;
|
|
if(i<0)...
|
|
|
|
This usually is a programming error and can be avoided in all cases.
|
|
|
|
|
|
@item "cast to narrow type may cause loss of precision" (Warning)
|
|
|
|
A variable is cast to a type smaller than its original type, so
|
|
that some information may get lost.
|
|
However this warning will be displayed in lots of cases where
|
|
no problem can arise, e.g. (short)(a==b).
|
|
|
|
|
|
@item "pointer cast may cause alignment problems" (Warning)
|
|
|
|
A pointer is cast to a pointer to a type with stricter alignment
|
|
requirements, i.e. the new pointer might be invalid if you do not
|
|
know what you are doing.
|
|
Those casts should be avoidable in all 'usual' cases.
|
|
|
|
|
|
@item "no declaration of global variable <%s> before definition" (Warning)
|
|
|
|
It is usually good to declare all global variables (including
|
|
functions) in header files.
|
|
|
|
|
|
@item "'extern' inside function" (Warning)
|
|
|
|
Declaration of external variables in inner blocks is usually
|
|
not a good idea.
|
|
|
|
|
|
@item "dead assignment to <%s> eliminated" (Warning)
|
|
|
|
A variable is assigned a value that is never used or gets
|
|
overwritten before it is used. If this occurs in real code then
|
|
there is either an error or an unnecessary assignment.
|
|
|
|
This is detected only in optimizing compilation.
|
|
|
|
|
|
@item "var <%s> is used before defined" (Warning)
|
|
|
|
The variable is used before it was assigned a value and therefore
|
|
is undefined. It cannot be detected if the code where it is used
|
|
can be reached, but if it is reached it will cause undefined
|
|
behaviour. So it is most probably an error either way (see 170).
|
|
|
|
However not all uninitialized usages can be found.
|
|
|
|
Also note that the compiler may choose convenient values for
|
|
uninitialized variables. Example:
|
|
|
|
int f(int a)
|
|
@{
|
|
int x;
|
|
if(a) x=0;
|
|
return(x);
|
|
@}
|
|
|
|
Here the optimizer may choose that x==0 if it is uninitialized and
|
|
then only generate a return(0);
|
|
It can also happen that you get different values if you read an
|
|
uninitialized variable twice although it was not assigned a value
|
|
in between.
|
|
|
|
This is only detected in optimizing compilation.
|
|
|
|
|
|
@item "would need more than %ld optimizer passes for best results" (Warning)
|
|
|
|
The optimizer would probably be able to do some further
|
|
optimizations if you increased the number of allowed passes
|
|
with the -optpasses=n option.
|
|
|
|
|
|
@item "function <%s> has no return statement" (Warning)
|
|
|
|
A non-void function has no return statement. Either this function
|
|
never returns (then better declare it as void) or it reaches
|
|
end of control which would be an error.
|
|
|
|
As main() cannot be declared as void you will not be warned if
|
|
main has no return statement. If you want a warning for main, too,
|
|
you can turn on warning 174.
|
|
|
|
|
|
@item "function <main> has no return statement" (Warning)
|
|
|
|
The same like 173 for main, so you can turn it on/off separately.
|
|
|
|
|
|
@item "this code is weird" (Warning)
|
|
|
|
The code has a very strange control flow. There is probably a
|
|
jump inside a loop or something similar and the optimizer will
|
|
not make any loop optimization and perhaps worse register
|
|
allocation on this construct.
|
|
There must be goto statements in the source.
|
|
|
|
This warning is only detected in optimizing compilation.
|
|
|
|
|
|
@item "size of incomplete type not available" (Warning, ANSI-violation)
|
|
|
|
An incomplete type must not be the argument for sizeof.
|
|
|
|
|
|
@item "line too long" (FATAL, Error, ANSI-violation, Preprocessor)
|
|
|
|
|
|
|
|
@item "identifier must begin with a letter or underscore" (FATAL, Error, ANSI-violation, Preprocessor)
|
|
|
|
|
|
|
|
@item "cannot redefine macro" (Error, ANSI-violation, Preprocessor)
|
|
|
|
|
|
|
|
@item "missing ) after argumentlist" (Error, ANSI-violation, Preprocessor)
|
|
|
|
|
|
|
|
@item "identifier expected" (Error, ANSI-violation, Preprocessor)
|
|
|
|
|
|
|
|
@item "illegal character in identifier" (Error, ANSI-violation, Preprocessor)
|
|
|
|
|
|
|
|
@item "missing operand before/after ##" (Error, ANSI-violation, Preprocessor)
|
|
|
|
|
|
|
|
@item "no macro-argument after #-operator" (Error, ANSI-violation, Preprocessor)
|
|
|
|
|
|
|
|
@item "macro redefinition not allowed" (Error, ANSI-violation, Preprocessor)
|
|
|
|
|
|
|
|
@item "unexpected end of file (unterminated comment)" (FATAL, Error, Preprocessor)
|
|
|
|
|
|
|
|
@item "too many nested includes" (FATAL, Error, Preprocessor)
|
|
|
|
|
|
|
|
@item "#else without #if/#ifdef/#ifndef" (FATAL, Error, ANSI-violation, Preprocessor)
|
|
|
|
|
|
|
|
@item "#else after #else" (Error, ANSI-violation, Preprocessor)
|
|
|
|
|
|
|
|
@item "#endif without #if" (Error, ANSI-violation, Preprocessor)
|
|
|
|
|
|
|
|
@item "cannot include file" (FATAL, Error, Preprocessor)
|
|
|
|
|
|
|
|
@item "expected \" or < in #include-directive" (Error, ANSI-violation, Preprocessor)
|
|
|
|
|
|
|
|
@item "unknown #-directive" (Warning, Preprocessor)
|
|
|
|
|
|
|
|
@item "wrong number of macro arguments" (Error, ANSI-violation, Preprocessor)
|
|
|
|
|
|
|
|
@item "macro argument expected" (Error, ANSI-violation, Preprocessor)
|
|
|
|
|
|
|
|
@item "out of memory" (FATAL, Error, Preprocessor)
|
|
|
|
|
|
|
|
@item "macro redefinition" (Warning, Preprocessor)
|
|
|
|
|
|
|
|
@item "/* in comment" (Warning, Preprocessor)
|
|
|
|
|
|
|
|
@item "cannot undefine macro" (Error, ANSI-violation, Preprocessor)
|
|
|
|
|
|
|
|
@item "characters after #-directive ignored" (Warning, Preprocessor)
|
|
|
|
|
|
|
|
@item "duplicate case labels" (Warning, ANSI-violation)
|
|
|
|
Each case-label in a switch-statement must have a distinct constant
|
|
value attached (after converting it to the type of the
|
|
switch-expression).
|
|
|
|
|
|
@item "var <%s> is incomplete" (Warning, ANSI-violation)
|
|
|
|
An incomplete var was defined. probably you wrote something like:
|
|
|
|
int a[];
|
|
|
|
|
|
@item "long float is no longer valid" (Warning, ANSI-violation)
|
|
|
|
'long float' was a synonym for double in K&R C, but this is no longer
|
|
allowed in ANSI C.
|
|
|
|
|
|
@item "long double is not really supported by vbcc" (Warning)
|
|
|
|
vbcc does not know about long double yet and therefore will use it
|
|
simply as a synonym for double. This should not break any legal code,
|
|
but you will not get error messages if you e.g. assign a pointer to
|
|
double to a pointer to long double.
|
|
|
|
|
|
@item "empty struct-declarations are not yet handled correct" (Warning)
|
|
|
|
obsolete
|
|
|
|
|
|
@item "identifier too long (only %d characters are significant)" (Warning)
|
|
|
|
|
|
|
|
@item "illegal initialization of var <%s>" (Warning, ANSI-violation)
|
|
|
|
Perhaps you tried to initialize a variable with external linkage
|
|
in an inner block.
|
|
|
|
|
|
@item "suspicious loop" (Warning)
|
|
|
|
vbcc thinks a loop-condition looks suspicious. A possible example
|
|
could be for(i=0;i!=7;i+=2)
|
|
|
|
|
|
@item "ansi/iso-mode turned on" (Warning)
|
|
|
|
You turned on the ANSI/ISO-conforming mode. This warning is always
|
|
displayed unless it is suppressed. So vbcc cannot be blamed to miss
|
|
a diagnostic for any constraint violation. :-)
|
|
|
|
|
|
@item "division by zero (result set to 0)" (Warning, ANSI-violation)
|
|
|
|
Similar to warning 84.
|
|
|
|
|
|
@item "constant out of range" (Warning, ANSI-violation)
|
|
|
|
An integral constant is too large to fit into an unsigned long.
|
|
|
|
|
|
@item "constant is unsigned due to size" (Warning)
|
|
|
|
If an integral constant is so large that it cannot be represented
|
|
as long its type is promoted to unsigned long.
|
|
|
|
|
|
@item "varargs function called without prototype in scope" (Warning)
|
|
|
|
A function which takes a variable number of arguments must not be
|
|
called without a prototype in scope. E.g. calling printf() without
|
|
#include <stdio.h> may cause this warning.
|
|
|
|
|
|
@item "suspicious format string" (Warning)
|
|
|
|
The format-string of a printf-/scanflike function seems to be corrupt
|
|
or not matching the type of the arguments.
|
|
|
|
|
|
@item "format string contains \'\\0\'" (Warning)
|
|
|
|
The format string for a printf-/scanflike function contains an
|
|
embedded '\0' character.
|
|
|
|
|
|
@item "illegal use of keyword <%s>" (Warning, ANSI-violation)
|
|
|
|
The reserved keywords of C may not be used as identifier.
|
|
|
|
|
|
@item "register <%s> used with wrong type" (Error)
|
|
|
|
|
|
@item "register <%s> is not free" (Error)
|
|
|
|
|
|
@item "'__reg' used in old-style function definition" (Warning)
|
|
|
|
|
|
@item "unknown register \"%s\"" (Warning)
|
|
|
|
|
|
@item "'...' only allowed with prototypes" (Warning, ANSI-violation)
|
|
|
|
|
|
@item "Hey, do you really know the priority of '&&' vs. '||'?" (Warning)
|
|
|
|
|
|
@item "be careful with priorities of <</>> vs. +/-" (Warning)
|
|
|
|
|
|
@item "address of auto variable returned" (Warning)
|
|
|
|
|
|
@item "void function returns a void expression" (Warning)
|
|
|
|
|
|
@item "redeclaration of typedef <%s>" (Warning, ANSI-violation)
|
|
|
|
|
|
@item "multiple specification of attribute \"%s\"" (Warning)
|
|
|
|
|
|
@item "redeclaration of var \"%s\" with differing setting of attribute \"%s\"" (Warning)
|
|
|
|
@item "string-constant expected" (Error)
|
|
|
|
@item "tag \"%s\" used for wrong type" (Warning, ANSI-violation)
|
|
|
|
@item "member after flexible array member" (Error, ANSI-violation)
|
|
|
|
@item "illegal number" (Error, ANSI-violation)
|
|
|
|
@item "void character constant" (Preprocessor, Error, ANSI-violation)
|
|
|
|
@item "spurious tail in octal character constant" (Preprocessor, Error, ANSI-violation)
|
|
|
|
@item "spurious tail in hexadecimal character constant" (Preprocessor, Error, ANSI-violation)
|
|
|
|
@item "illegal escape sequence in character constant" (Preprocessor, Error, ANSI-violation)
|
|
|
|
@item "invalid constant integer value" (Preprocessor, Error, ANSI-violation)
|
|
|
|
@item "a right parenthesis was expected" (Preprocessor, Error, ANSI-violation)
|
|
|
|
@item "a colon was expected" (Preprocessor, Error, ANSI-violation)
|
|
|
|
@item "truncated constant integral expression" (Preprocessor, Error, ANSI-violation)
|
|
|
|
@item "rogue operator '%s' in constant integral expression" (Preprocessor, Error, ANSI-violation)
|
|
|
|
@item "invalid token in constant integral expression" (Preprocessor, Error, ANSI-violation)
|
|
|
|
@item "trailing garbage in constant integral expression" (Preprocessor, Error, ANSI-violation)
|
|
|
|
@item "void condition for a #if/#elif" (Preprocessor, Error, ANSI-violation)
|
|
|
|
@item "void condition (after expansion) for a #if/#elif" (Preprocessor, Error, ANSI-violation)
|
|
|
|
@item "invalid '#include'" (Preprocessor, Error, ANSI-violation)
|
|
|
|
@item "macro expansion did not produce a valid filename for #include" (Preprocessor, Error, ANSI-violation)
|
|
|
|
@item "file '%s' not found" (Preprocessor, Error, ANSI-violation)
|
|
|
|
@item "not a valid number for #line" (Preprocessor, Error, ANSI-violation)
|
|
|
|
@item "not a valid filename for #line" (Preprocessor, Error, ANSI-violation)
|
|
|
|
@item "rogue '#'" (Preprocessor, Error, ANSI-violation)
|
|
|
|
@item "rogue #else" (Preprocessor, Error, ANSI-violation)
|
|
|
|
@item "rogue #elif" (Preprocessor, Error, ANSI-violation)
|
|
|
|
@item "unmatched #endif" (Preprocessor, Error, ANSI-violation)
|
|
|
|
@item "unknown cpp directive '#%s'" (Preprocessor, Error, ANSI-violation)
|
|
|
|
@item "unterminated #if construction" (Preprocessor, Error, ANSI-violation)
|
|
|
|
@item "could not flush output (disk full ?)" (Preprocessor, Error, ANSI-violation)
|
|
|
|
@item "truncated token" (Preprocessor, Error, ANSI-violation)
|
|
|
|
@item "illegal character '%c'" (Preprocessor, Error, ANSI-violation)
|
|
|
|
@item "unfinished string at end of line" (Preprocessor, Error, ANSI-violation)
|
|
|
|
@item "missing macro name" (Preprocessor, Error, ANSI-violation)
|
|
|
|
@item "trying to redefine the special macro %s" (Preprocessor, Error, ANSI-violation)
|
|
|
|
@item "truncated macro definition" (Preprocessor, Error, ANSI-violation)
|
|
|
|
@item "'...' must end the macro argument list" (Preprocessor, Error, ANSI-violation)
|
|
|
|
@item "void macro argument" (Preprocessor, Error, ANSI-violation)
|
|
|
|
@item "missing comma in macro argument list" (Preprocessor, Error, ANSI-violation)
|
|
|
|
@item "invalid macro argument" (Preprocessor, Error, ANSI-violation)
|
|
|
|
@item "duplicate macro argument" (Preprocessor, Error, ANSI-violation)
|
|
|
|
@item "'__VA_ARGS__' is forbidden in macros with a fixed number of arguments" (Preprocessor, Error, ANSI-violation)
|
|
|
|
@item "operator '##' may neither begin nor end a macro" (Preprocessor, Error, ANSI-violation)
|
|
|
|
@item "operator '#' not followed by a macro argument" (Preprocessor, Error, ANSI-violation)
|
|
|
|
@item "macro '%s' redefined unidentically" (Preprocessor, Error, ANSI-violation)
|
|
|
|
@item "not enough arguments to macro" (Preprocessor, Error, ANSI-violation)
|
|
|
|
@item "unfinished macro call" (Preprocessor, Error, ANSI-violation)
|
|
|
|
@item "too many argument to macro" (Preprocessor, Error, ANSI-violation)
|
|
|
|
@item "operator '##' produced the invalid token '%s%s'" (Preprocessor, Error, ANSI-violation)
|
|
|
|
@item "quad sharp" (Preprocessor, Error, ANSI-violation)
|
|
|
|
@item "void macro name" (Preprocessor, Error, ANSI-violation)
|
|
|
|
@item "macro %s already defined" (Preprocessor, Error, ANSI-violation)
|
|
|
|
@item "trying to undef special macro %s" (Preprocessor, Error, ANSI-violation)
|
|
|
|
@item "illegal macro name for #ifdef" (Preprocessor, Error, ANSI-violation)
|
|
|
|
@item "unfinished #ifdef" (Preprocessor, Error, ANSI-violation)
|
|
|
|
@item "illegal macro name for #undef" (Preprocessor, Error, ANSI-violation)
|
|
|
|
@item "unfinished #undef" (Preprocessor, Error, ANSI-violation)
|
|
|
|
@item "illegal macro name for #ifndef" (Preprocessor, Error, ANSI-violation)
|
|
|
|
@item "unfinished #ifndef" (Preprocessor, Error, ANSI-violation)
|
|
|
|
@item "reconstruction of <foo> in #include" (Preprocessor, Warning)
|
|
|
|
@item "comment in the middle of a cpp directive" (Preprocessor, Warning)
|
|
|
|
@item "null cpp directive" (Preprocessor, Warning)
|
|
|
|
@item "rogue '#' in code compiled out" (Preprocessor, Warning)
|
|
|
|
@item "rogue '#' dumped" (Preprocessor, Warning)
|
|
|
|
@item "#error%s" (Preprocessor, ANSI-violation, Error)
|
|
|
|
@item "trigraph ?""?%c encountered" (Preprocessor, Warning)
|
|
|
|
@item "unterminated #if construction (depth %ld)" (Preprocessor, Error, ANSI-violation)
|
|
|
|
@item "malformed identifier with UCN: '%s'" (Preprocessor, Warning, ANSI-violation)
|
|
|
|
@item "truncated UTF-8 character" (Preprocessor, Warning, ANSI-violation)
|
|
|
|
@item "identifier not followed by whitespace in #define" (Preprocessor, Warning, ANSI-violation)
|
|
|
|
@item "assignment discards restrict" (Warning, ANSI-violation)
|
|
|
|
@item "storage-class in declaration within for() converted to auto" (Warning, ANSI-violation)
|
|
|
|
@item "corrupted special object" (ANSI-violation, Fatal)
|
|
|
|
@item "<inline> only allowed in function declarations" (Error, ANSI-violation)
|
|
|
|
@item "reference to static variable <%s> in inline function with external linkage" (Error, ANSI-violation)
|
|
|
|
@item "underflow of pragma popwarn" (Error, ANSI-violation)
|
|
|
|
@item "invalid argument to _Pragma" (Preprocessor, Error, ANSI-violation)
|
|
|
|
@item "missing comma before '...'" (Preprocessor, Error, ANSI-violation)
|
|
|
|
@item "padding bytes behind member <%s>" (Warning)
|
|
|
|
@item "member <%s> does not have natural alignment" (Warning)
|
|
|
|
@item "function <%s> exceeds %s limit" (Warning)
|
|
|
|
@item "%s could not be calculated for function <%s>" (Warning)
|
|
|
|
@item "offsetof applied to non-struct" (Error, ANSI-violation)
|
|
|
|
@item "trailing garbage in #ifdef" (Preprocessor, Warning, ANSI-violation)
|
|
|
|
@item "too many arguments to macro" (Preprocessor, Warning, ANSI-violation)
|
|
|
|
@item "truncated comment" (Preprocessor, Warning|ANSI-violation)
|
|
|
|
@item "trailing garbage in preprocessing directive" (Preprocessor, Warning, ANSI-violation)
|
|
|
|
@item "variable-length array must have auto storage-class" (Error, ANSI-violation)
|
|
|
|
@item "member <%s> has type with zero alignment/size (probably void)" (Error, ANSI-violation, Fatal)
|
|
|
|
@item "stack information for target <%s> unavailable" (Warning)
|
|
|
|
@item "used registers information unavailable for target <%s>" (Warning)
|
|
|
|
@item "computed %sstack usage %d but set to %d" (Warning)
|
|
|
|
@item "unable to compute call targets" (Warning)
|
|
|
|
@item "computed register usage differs from specified one" (Warning)
|
|
|
|
@item "trailing garbage in #include" (Preprocessor, Warning ,ANSI-violation)
|
|
|
|
@item "target-warning: %s" (Warning)
|
|
|
|
@item "target-error: %s" (Error)
|