mirror of
https://github.com/cc65/cc65.git
synced 2025-02-05 20:31:53 +00:00
Fixed diagnostic messages about undeclared identifiers.
This commit is contained in:
parent
7574e36e95
commit
b99ebc1256
@ -102,7 +102,7 @@ static SymEntry* AsmGetSym (unsigned Arg, unsigned Type)
|
||||
|
||||
/* Did we find a symbol with this name? */
|
||||
if (Sym == 0) {
|
||||
Error ("Undefined symbol '%s' for argument %u", CurTok.Ident, Arg);
|
||||
Error ("Undeclared symbol '%s' for argument %u", CurTok.Ident, Arg);
|
||||
AsmErrorSkip ();
|
||||
return 0;
|
||||
}
|
||||
|
@ -1322,10 +1322,10 @@ static void Primary (ExprDesc* E)
|
||||
E->Name = (uintptr_t) Sym->Name;
|
||||
} else {
|
||||
/* Undeclared Variable */
|
||||
Error ("Undeclared identifier '%s'", Ident);
|
||||
Sym = AddLocalSym (Ident, type_int, SC_AUTO | SC_REF, 0);
|
||||
E->Flags = E_LOC_STACK | E_RTYPE_LVAL;
|
||||
E->Type = type_int;
|
||||
Error ("Undefined symbol: '%s'", Ident);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1484,7 +1484,7 @@ void MakeZPSym (const char* Name)
|
||||
if (Entry) {
|
||||
Entry->Flags |= SC_ZEROPAGE;
|
||||
} else {
|
||||
Error ("Undefined symbol: '%s'", Name);
|
||||
Error ("Undeclared symbol: '%s'", Name);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
custom-reference-error.c:18: Error: Call to undeclared function 'printf'
|
||||
custom-reference-error.c:19: Error: Undefined symbol: 'n'
|
||||
custom-reference-error.c:19: Error: Undeclared identifier 'n'
|
||||
custom-reference-error.c:21: Warning: Control reaches end of non-void function [-Wreturn-type]
|
||||
custom-reference-error.c:21: Warning: Parameter 'argc' is never used
|
||||
custom-reference-error.c:21: Warning: Parameter 'argv' is never used
|
||||
|
Loading…
x
Reference in New Issue
Block a user