* listing.c (listing_listing): Remove useless loop.
authorBen Elliston <bje@au.ibm.com>
Mon, 1 May 2006 09:21:46 +0000 (09:21 +0000)
committerBen Elliston <bje@au.ibm.com>
Mon, 1 May 2006 09:21:46 +0000 (09:21 +0000)
* macro.c (macro_expand): Remove is_positional local variable.
* read.c (s_comm_internal): Simplify `if' condition 1 || x -> 1
and simplify surrounding expressions, where possible.
(assign_symbol): Likewise.
(s_weakref): Likewise.
* symbols.c (colon): Likewise.

gas/ChangeLog
gas/listing.c
gas/macro.c
gas/read.c
gas/symbols.c

index 263654ab8c27d8028dd1fac89ba6c771dac4a201..3ef40aba499a206296e3f7ae16ccd0efec721d3f 100644 (file)
@@ -1,3 +1,13 @@
+2006-05-01  Ben Elliston  <bje@au.ibm.com>
+
+       * listing.c (listing_listing): Remove useless loop.
+       * macro.c (macro_expand): Remove is_positional local variable.
+       * read.c (s_comm_internal): Simplify `if' condition 1 || x -> 1
+       and simplify surrounding expressions, where possible.
+       (assign_symbol): Likewise.
+       (s_weakref): Likewise.
+       * symbols.c (colon): Likewise.
+
 2006-05-01  James Lemke  <jwlemke@wasabisystems.com>
 
        * subsegs.c (subseg_set_rest): Always set seginfp->frchainP if NULL.
index 61ef6f55e40f94acc29a8d38abcf6aa6cba8ade0..717ed60111c86f0559bdee76ead752908c1d2af3 100644 (file)
@@ -946,15 +946,6 @@ listing_listing (char *name ATTRIBUTE_UNUSED)
   buffer = xmalloc (listing_rhs_width);
   data_buffer = xmalloc (MAX_BYTES);
   eject = 1;
-  list = head;
-
-  while (list != (list_info_type *) NULL && 0)
-    {
-      if (list->next)
-       list->frag = list->next->frag;
-      list = list->next;
-    }
-
   list = head->next;
 
   while (list)
index af98bada6a866e6dd87f3f7ddf30b14fcf302e09..e6e9d05ba2728814140a2cfefc7e7add80497610 100644 (file)
@@ -1025,7 +1025,6 @@ macro_expand (int idx, sb *in, macro_entry *m, sb *out)
   sb t;
   formal_entry *ptr;
   formal_entry *f;
-  int is_positional = 0;
   int is_keyword = 0;
   int narg = 0;
   const char *err = NULL;
@@ -1116,8 +1115,6 @@ macro_expand (int idx, sb *in, macro_entry *m, sb *out)
        }
       else
        {
-         /* This is a positional arg.  */
-         is_positional = 1;
          if (is_keyword)
            {
              err = _("can't mix positional and keyword arguments");
index 0485d72dec6726986e4315c853a1859c2fda6e98..d51835e3cecfcc22f8f5af4d7c62f438a0533eb2 100644 (file)
@@ -1,6 +1,6 @@
 /* read.c - read a source file -
    Copyright 1986, 1987, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
-   1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
+   1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
    Free Software Foundation, Inc.
 
 This file is part of GAS, the GNU Assembler.
@@ -1478,10 +1478,7 @@ s_comm_internal (int param,
          ignore_rest_of_line ();
          goto out;
        }
-      /* This could be avoided when the symbol wasn't used so far, but
-        the comment in struc-symbol.h says this flag isn't reliable.  */
-      if (1 || !symbol_used_p (symbolP))
-       symbolP = symbol_clone (symbolP, 1);
+      symbolP = symbol_clone (symbolP, 1);
       S_SET_SEGMENT (symbolP, undefined_section);
       S_SET_VALUE (symbolP, 0);
       symbol_set_frag (symbolP, &zero_address_frag);
@@ -2812,10 +2809,7 @@ assign_symbol (char *name, int mode)
       /* If the symbol is volatile, copy the symbol and replace the
         original with the copy, so that previous uses of the symbol will
         retain the value of the symbol at the point of use.  */
-      else if (S_IS_VOLATILE (symbolP)
-         /* This could be avoided when the symbol wasn't used so far, but
-            the comment in struc-symbol.h says this flag isn't reliable.  */
-         && (1 || symbol_used_p (symbolP)))
+      else if (S_IS_VOLATILE (symbolP))
        symbolP = symbol_clone (symbolP, 1);
     }
 
@@ -3186,17 +3180,14 @@ s_weakref (int ignore ATTRIBUTE_UNUSED)
 
   if (S_IS_DEFINED (symbolP) || symbol_equated_p (symbolP))
     {
-      if(!S_IS_VOLATILE (symbolP))
+      if (!S_IS_VOLATILE (symbolP))
        {
          as_bad (_("symbol `%s' is already defined"), name);
          *end_name = delim;
          ignore_rest_of_line ();
          return;
        }
-      /* This could be avoided when the symbol wasn't used so far, but
-        the comment in struc-symbol.h says this flag isn't reliable.  */
-      if (1 || !symbol_used_p (symbolP))
-       symbolP = symbol_clone (symbolP, 1);
+      symbolP = symbol_clone (symbolP, 1);
       S_CLEAR_VOLATILE (symbolP);
     }
 
index ca2d41ea9ca5beb0cd055d39618bf0fbcc3ae947..499e8c4d31b3bf43d517034758f70a18de2c9367 100644 (file)
@@ -336,10 +336,7 @@ colon (/* Just seen "x:" - rattle symbols & frags.  */
               || S_IS_COMMON (symbolP)
               || S_IS_VOLATILE (symbolP))
        {
-         if (S_IS_VOLATILE (symbolP)
-             /* This could be avoided when the symbol wasn't used so far, but
-                the comment in struc-symbol.h says this flag isn't reliable.  */
-             && (1 || !symbol_used_p (symbolP)))
+         if (S_IS_VOLATILE (symbolP))
            {
              symbolP = symbol_clone (symbolP, 1);
              S_SET_VALUE (symbolP, 0);
This page took 0.030676 seconds and 4 git commands to generate.