aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2004-04-16 01:55:27 +0000
committerAlan Modra <amodra@gmail.com>2004-04-16 01:55:27 +0000
commitf4c724fc32c913252cfda9ce052ad84afe3258b6 (patch)
tree4a624305caf68721d7948427b03e1f47d478904d
parentc2215ad2888c9fe23d0667c3e18163bcbf85cdf3 (diff)
downloadgdb-f4c724fc32c913252cfda9ce052ad84afe3258b6.zip
gdb-f4c724fc32c913252cfda9ce052ad84afe3258b6.tar.gz
gdb-f4c724fc32c913252cfda9ce052ad84afe3258b6.tar.bz2
* expr.c (operand): Correct checks for ++ and --.
-rw-r--r--gas/ChangeLog4
-rw-r--r--gas/expr.c4
2 files changed, 6 insertions, 2 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 6f6b7e4..d0a6967 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,7 @@
+2004-04-16 Alan Modra <amodra@bigpond.net.au>
+
+ * expr.c (operand): Correct checks for ++ and --.
+
2004-04-14 H.J. Lu <hongjiu.lu@intel.com>
* config/tc-generic.c: Add some comments.
diff --git a/gas/expr.c b/gas/expr.c
index b7cc1b8..19e3f1c 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);