mirror of
https://github.com/cc65/cc65.git
synced 2025-01-11 11:30:13 +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:
|
||||
GetSegExprVal (Expr->Left, &D);
|
||||
if (D.TooComplex || D.Seg == 0) {
|
||||
Error ("Argument for .BANK is not segment relative or too complex");
|
||||
if (D.TooComplex) {
|
||||
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) {
|
||||
Error ("Segment '%s' is referenced by .BANK but "
|
||||
"not assigned to a memory area",
|
||||
Error ("Segment '%s' is referenced by .BANK(),"
|
||||
" but not assigned to a memory area",
|
||||
GetString (D.Seg->Name));
|
||||
}
|
||||
if (D.Seg->MemArea->BankExpr == 0) {
|
||||
Error ("Memory area '%s' is referenced by .BANK but "
|
||||
"has no BANK attribute",
|
||||
Error ("Memory area '%s' is referenced by .BANK(),"
|
||||
" but has no BANK attribute",
|
||||
GetString (D.Seg->MemArea->Name));
|
||||
}
|
||||
return GetExprVal (D.Seg->MemArea->BankExpr);
|
||||
|
Loading…
x
Reference in New Issue
Block a user