mirror of
https://github.com/uffejakobsen/acme.git
synced 2025-02-16 19:32:16 +00:00
added warning about parentheses for mnemonics without indirect addressing. currently needs "--test", will be enabled in next release.
git-svn-id: https://svn.code.sf.net/p/acme-crossass/code-0/trunk@153 4df02467-bbd4-4a76-a152-e7ce94205b78
This commit is contained in:
parent
abdea30e33
commit
4c938480fc
@ -522,8 +522,10 @@ static void get_int_arg(struct number *result, boolean complain_about_indirect)
|
|||||||
|
|
||||||
ALU_addrmode_int(&expression, 0); // accept 0 parentheses still open (-> complain!)
|
ALU_addrmode_int(&expression, 0); // accept 0 parentheses still open (-> complain!)
|
||||||
if (expression.is_parenthesized && complain_about_indirect) {
|
if (expression.is_parenthesized && complain_about_indirect) {
|
||||||
// FIXME - add warning for "there are useless (), you know this mnemonic does not have indirect addressing, right?"
|
if (config.test_new_features) {
|
||||||
// or rather raise error and be done with it?
|
// TODO - raise error and be done with it?
|
||||||
|
Throw_first_pass_warning("There are unneeded parentheses, you know indirect addressing is impossible here, right?"); // FIXME - rephrase!
|
||||||
|
}
|
||||||
}
|
}
|
||||||
*result = expression.number;
|
*result = expression.number;
|
||||||
}
|
}
|
||||||
@ -549,7 +551,7 @@ static int get_addr_mode(struct number *result)
|
|||||||
break;
|
break;
|
||||||
case '[':
|
case '[':
|
||||||
GetByte(); // proceed with next char
|
GetByte(); // proceed with next char
|
||||||
get_int_arg(result, FALSE);
|
get_int_arg(result, TRUE);
|
||||||
typesystem_want_addr(result);
|
typesystem_want_addr(result);
|
||||||
if (GotByte == ']')
|
if (GotByte == ']')
|
||||||
address_mode_bits = AMB_LONGINDIRECT | AMB_INDEX(get_index(TRUE));
|
address_mode_bits = AMB_LONGINDIRECT | AMB_INDEX(get_index(TRUE));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user