public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* PATCH: last of the gas tidy-ups
@ 2006-05-09  6:53 Ben Elliston
  2006-05-09  8:06 ` Alan Modra
  0 siblings, 1 reply; 2+ messages in thread
From: Ben Elliston @ 2006-05-09  6:53 UTC (permalink / raw)
  To: binutils

This is the last of my stray binutils patches that have been lurking
in my tree.  Okay for mainline?

2006-05-09  Ben Elliston  <bje@au.ibm.com>

        * expr.c (operand): Remove `if (0 && ..)' statement and
        subsequently unused target_op label.  Collapse `if (1 || ..)'
        statement.
        * app.c (do_scrub_chars): Remove unused case 0, as it is handled
        separately above the switch.

Index: expr.c
===================================================================
RCS file: /cvs/src/src/gas/expr.c,v
retrieving revision 1.65
diff -u -p -r1.65 expr.c
--- expr.c      4 Apr 2006 08:04:57 -0000       1.65
+++ expr.c      9 May 2006 04:29:01 -0000
@@ -1003,11 +1003,6 @@ operand (expressionS *expressionP, enum 
     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 +1286,6 @@ operand (expressionS *expressionP, enum 
        }
       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 +1546,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])
Index: app.c
===================================================================
RCS file: /cvs/src/src/gas/app.c,v
retrieving revision 1.34
diff -u -p -r1.34 app.c
--- app.c       10 Mar 2006 10:57:18 -0000      1.34
+++ app.c       9 May 2006 04:29:03 -0000
@@ -888,9 +888,6 @@ do_scrub_chars (int (*get) (char *, int)
 
          switch (state)
            {
-           case 0:
-             state++;
-             goto recycle;     /* Punted leading sp */
            case 1:
              /* We can arrive here if we leave a leading whitespace
                 character at the beginning of a line.  */

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: PATCH: last of the gas tidy-ups
  2006-05-09  6:53 PATCH: last of the gas tidy-ups Ben Elliston
@ 2006-05-09  8:06 ` Alan Modra
  0 siblings, 0 replies; 2+ messages in thread
From: Alan Modra @ 2006-05-09  8:06 UTC (permalink / raw)
  To: Ben Elliston; +Cc: binutils

On Tue, May 09, 2006 at 02:31:09PM +1000, Ben Elliston wrote:
>         * expr.c (operand): Remove `if (0 && ..)' statement and
>         subsequently unused target_op label.  Collapse `if (1 || ..)'
>         statement.
>         * app.c (do_scrub_chars): Remove unused case 0, as it is handled
>         separately above the switch.

OK.

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-05-09  4:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-05-09  6:53 PATCH: last of the gas tidy-ups Ben Elliston
2006-05-09  8:06 ` Alan Modra

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).