From: Alan Modra Date: Fri, 16 Apr 2004 01:55:27 +0000 (+0000) Subject: * expr.c (operand): Correct checks for ++ and --. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f4c724fc32c913252cfda9ce052ad84afe3258b6;p=binutils-gdb.git * expr.c (operand): Correct checks for ++ and --. --- diff --git a/gas/ChangeLog b/gas/ChangeLog index 6f6b7e42e92..d0a6967c0b7 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,7 @@ +2004-04-16 Alan Modra + + * expr.c (operand): Correct checks for ++ and --. + 2004-04-14 H.J. Lu * config/tc-generic.c: Add some comments. diff --git a/gas/expr.c b/gas/expr.c index b7cc1b8cacb..19e3f1c0387 100644 --- a/gas/expr.c +++ b/gas/expr.c @@ -1022,7 +1022,7 @@ operand (expressionS *expressionP) case '+': /* Do not accept ++e as +(+e) */ - if (input_line_pointer[1] == '+') + if (*input_line_pointer == '+') goto target_op; (void) operand (expressionP); break; @@ -1042,7 +1042,7 @@ operand (expressionS *expressionP) case '-': { /* Do not accept --e as -(-e) */ - if (c == '-' && input_line_pointer[1] == '-') + if (c == '-' && *input_line_pointer == '-') goto target_op; operand (expressionP);