mirror of
https://github.com/cc65/cc65.git
synced 2025-02-19 06:30:53 +00:00
Improved ld65's error messages about ca65's .BANK() function.
* Split a message into two more specific messages.
This commit is contained in:
parent
39ef63cbbc
commit
1c16e46f23
@ -403,17 +403,20 @@ long GetExprVal (ExprNode* Expr)
|
|||||||
|
|
||||||
case EXPR_BANK:
|
case EXPR_BANK:
|
||||||
GetSegExprVal (Expr->Left, &D);
|
GetSegExprVal (Expr->Left, &D);
|
||||||
if (D.TooComplex || D.Seg == 0) {
|
if (D.TooComplex) {
|
||||||
Error ("Argument for .BANK is not segment relative or too complex");
|
Error ("Argument of .BANK() is too complex");
|
||||||
|
}
|
||||||
|
if (D.Seg == 0) {
|
||||||
|
Error ("Argument of .BANK() isn't a label attached to a segment");
|
||||||
}
|
}
|
||||||
if (D.Seg->MemArea == 0) {
|
if (D.Seg->MemArea == 0) {
|
||||||
Error ("Segment '%s' is referenced by .BANK but "
|
Error ("Segment '%s' is referenced by .BANK(),"
|
||||||
"not assigned to a memory area",
|
" but not assigned to a memory area",
|
||||||
GetString (D.Seg->Name));
|
GetString (D.Seg->Name));
|
||||||
}
|
}
|
||||||
if (D.Seg->MemArea->BankExpr == 0) {
|
if (D.Seg->MemArea->BankExpr == 0) {
|
||||||
Error ("Memory area '%s' is referenced by .BANK but "
|
Error ("Memory area '%s' is referenced by .BANK(),"
|
||||||
"has no BANK attribute",
|
" but has no BANK attribute",
|
||||||
GetString (D.Seg->MemArea->Name));
|
GetString (D.Seg->MemArea->Name));
|
||||||
}
|
}
|
||||||
return GetExprVal (D.Seg->MemArea->BankExpr);
|
return GetExprVal (D.Seg->MemArea->BankExpr);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user