summaryrefslogtreecommitdiffstats
path: root/contrib/binutils/gas/expr.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/binutils/gas/expr.c')
-rw-r--r--contrib/binutils/gas/expr.c21
1 files changed, 6 insertions, 15 deletions
diff --git a/contrib/binutils/gas/expr.c b/contrib/binutils/gas/expr.c
index 69f0aac..11f2942 100644
--- a/contrib/binutils/gas/expr.c
+++ b/contrib/binutils/gas/expr.c
@@ -1,6 +1,6 @@
/* expr.c -operands, expressions-
Copyright 1987, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
- 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+ 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -25,7 +25,6 @@
(It also gives smaller files to re-compile.)
Here, "operand"s are of expressions, not instructions. */
-#include <string.h>
#define min(a, b) ((a) < (b) ? (a) : (b))
#include "as.h"
@@ -1003,11 +1002,6 @@ operand (expressionS *expressionP, enum expr_mode mode)
case '-':
case '+':
{
- /* Do not accept ++e or --e as +(+e) or -(-e)
- Disabled, since the preprocessor removes whitespace. */
- if (0 && (c == '-' || c == '+') && *input_line_pointer == c)
- goto target_op;
-
operand (expressionP, mode);
if (expressionP->X_op == O_constant)
{
@@ -1291,7 +1285,6 @@ operand (expressionS *expressionP, enum expr_mode mode)
}
else
{
- target_op:
/* Let the target try to parse it. Success is indicated by changing
the X_op field to something other than O_absent and pointing
input_line_pointer past the expression. If it can't parse the
@@ -1552,11 +1545,7 @@ operator (int *num_chars)
case '+':
case '-':
- /* 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;
+ return op_encoding[c];
case '<':
switch (input_line_pointer[1])
@@ -1647,7 +1636,7 @@ expr (int rankarg, /* Larger # is higher rank. */
operatorT op_right;
int op_chars;
- know (rank >= 0);
+ know (rankarg >= 0);
/* Save the value of dot for the fixup code. */
if (rank == 0)
@@ -1796,7 +1785,9 @@ expr (int rankarg, /* Larger # is higher rank. */
case O_bit_or_not: resultP->X_add_number |= ~v; break;
case O_bit_exclusive_or: resultP->X_add_number ^= v; break;
case O_bit_and: resultP->X_add_number &= v; break;
- case O_add: resultP->X_add_number += v; break;
+ /* Constant + constant (O_add) is handled by the
+ previous if statement for constant + X, so is omitted
+ here. */
case O_subtract: resultP->X_add_number -= v; break;
case O_eq:
resultP->X_add_number =
OpenPOWER on IntegriCloud