Check for and flag address size modifiers that are invalid for the choosen CPU.
git-svn-id: svn://svn.cc65.org/cc65/trunk@3927 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
@@ -127,6 +127,11 @@ static unsigned char OptionalAddrSize (void)
|
||||
if (Tok == TOK_COLON) {
|
||||
NextTok ();
|
||||
AddrSize = ParseAddrSize ();
|
||||
if (!ValidAddrSizeForCPU (AddrSize)) {
|
||||
/* Print an error and reset to default */
|
||||
Error ("Invalid address size specification for current CPU");
|
||||
AddrSize = ADDR_SIZE_DEFAULT;
|
||||
}
|
||||
NextTok ();
|
||||
}
|
||||
return AddrSize;
|
||||
|
||||
Reference in New Issue
Block a user