From: Alan Modra Date: Sun, 23 May 2004 04:35:11 +0000 (+0000) Subject: * expr.c (operand, operator): Don't reject '++' and '--'. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1181c20ef469d4c1d5c9593809653546506f29a8;p=binutils-gdb.git * expr.c (operand, operator): Don't reject '++' and '--'. --- diff --git a/gas/ChangeLog b/gas/ChangeLog index 3089e2a3dfa..2303c9e0c63 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,7 @@ +2004-05-23 Alan Modra + + * expr.c (operand, operator): Don't reject '++' and '--'. + 2004-05-20 Richard Sandiford * config/tc-mips.c (append_insn): Use ISA-encoded addresses in MIPS16 diff --git a/gas/expr.c b/gas/expr.c index 19e3f1c0387..d520a04bcd3 100644 --- a/gas/expr.c +++ b/gas/expr.c @@ -1021,8 +1021,9 @@ operand (expressionS *expressionP) break; case '+': - /* Do not accept ++e as +(+e) */ - if (*input_line_pointer == '+') + /* Do not accept ++e as +(+e). + Disabled, since the preprocessor removes whitespace. */ + if (0 && *input_line_pointer == '+') goto target_op; (void) operand (expressionP); break; @@ -1041,8 +1042,9 @@ operand (expressionS *expressionP) case '!': case '-': { - /* Do not accept --e as -(-e) */ - if (c == '-' && *input_line_pointer == '-') + /* Do not accept --e as -(-e) + Disabled, since the preprocessor removes whitespace. */ + if (0 && c == '-' && *input_line_pointer == '-') goto target_op; operand (expressionP); @@ -1551,8 +1553,9 @@ operator (int *num_chars) case '+': case '-': - /* Do not allow a++b and a--b to be a + (+b) and a - (-b) */ - if (input_line_pointer[1] != c) + /* Do not allow a++b and a--b to be a + (+b) and a - (-b) + Disabled, since the preprocessor removes whitespace. */ + if (1 || input_line_pointer[1] != c) return op_encoding[c]; return O_illegal;