+2004-03-18 Nathan Sidwell <nathan@codesourcery.com>
+
+ * expr.c (operand): Reject ++ and --.
+ (operator): Likewise.
+
2004-03-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
* config/tc-sh.c: Include dw2gencfi.h.
break;
case '+':
+ /* Do not accept ++e as +(+e) */
+ if (input_line_pointer[1] == '+')
+ goto target_op;
(void) operand (expressionP);
break;
case '!':
case '-':
{
+ /* Do not accept --e as -(-e) */
+ if (c == '-' && input_line_pointer[1] == '-')
+ goto target_op;
+
operand (expressionP);
if (expressionP->X_op == O_constant)
{
}
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
default:
return op_encoding[c];
+ case '+':
+ case '-':
+ /* Do not allow a++b and a--b to be a + (+b) and a - (-b) */
+ if (input_line_pointer[1] != c)
+ return op_encoding[c];
+ return O_illegal;
+
case '<':
switch (input_line_pointer[1])
{