From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19259 invoked by alias); 1 May 2006 04:48:41 -0000 Received: (qmail 19251 invoked by uid 22791); 1 May 2006 04:48:40 -0000 X-Spam-Check-By: sourceware.org Received: from ausmtp04.au.ibm.com (HELO ausmtp04.au.ibm.com) (202.81.18.152) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 01 May 2006 04:48:38 +0000 Received: from sd0208e0.au.ibm.com (d23rh904.au.ibm.com [202.81.18.202]) by ausmtp04.au.ibm.com (8.13.6/8.13.5) with ESMTP id k414wrwr212830 for ; Mon, 1 May 2006 14:58:53 +1000 Received: from d23av04.au.ibm.com (d23av04.au.ibm.com [9.190.250.237]) by sd0208e0.au.ibm.com (8.12.10/NCO/VER6.8) with ESMTP id k414prHt192078 for ; Mon, 1 May 2006 14:51:53 +1000 Received: from d23av04.au.ibm.com (loopback [127.0.0.1]) by d23av04.au.ibm.com (8.12.11/8.13.3) with ESMTP id k414mXJZ029798 for ; Mon, 1 May 2006 14:48:33 +1000 Received: from ozlabs.au.ibm.com (ozlabs.au.ibm.com [9.190.163.12]) by d23av04.au.ibm.com (8.12.11/8.12.11) with ESMTP id k414mXYs029621 for ; Mon, 1 May 2006 14:48:33 +1000 Received: by ozlabs.au.ibm.com (Postfix, from userid 1017) id EB87773724; Mon, 1 May 2006 14:49:28 +1000 (EST) Date: Mon, 01 May 2006 04:48:00 -0000 From: Ben Elliston To: binutils@sourceware.org Subject: PATCH: various gas tidy-ups Message-ID: <20060501044928.GA15768@ozlabs.au.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.6i Mailing-List: contact binutils-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sourceware.org X-SW-Source: 2006-05/txt/msg00002.txt.bz2 I have had these changes in my tree for a long time and want to now get them checked in. They're all pretty simple, but I wouldn't mind a review before I commit them. No testsuite regressions on i686-linux. Thanks, Ben 2006-05-01 Ben Elliston * 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. Index: listing.c =================================================================== RCS file: /cvs/src/src/gas/listing.c,v retrieving revision 1.29 diff -u -p -r1.29 listing.c --- listing.c 11 Aug 2005 01:25:20 -0000 1.29 +++ listing.c 1 May 2006 04:46:59 -0000 @@ -946,15 +946,6 @@ listing_listing (char *name ATTRIBUTE_UN 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: macro.c =================================================================== RCS file: /cvs/src/src/gas/macro.c,v retrieving revision 1.42 diff -u -p -r1.42 macro.c --- macro.c 28 Feb 2006 07:57:09 -0000 1.42 +++ macro.c 1 May 2006 04:47:01 -0000 @@ -1025,7 +1025,6 @@ macro_expand (int idx, sb *in, macro_ent 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_ent } else { - /* This is a positional arg. */ - is_positional = 1; if (is_keyword) { err = _("can't mix positional and keyword arguments"); Index: read.c =================================================================== RCS file: /cvs/src/src/gas/read.c,v retrieving revision 1.115 diff -u -p -r1.115 read.c --- read.c 17 Nov 2005 07:29:28 -0000 1.115 +++ read.c 1 May 2006 04:47:04 -0000 @@ -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: symbols.c =================================================================== RCS file: /cvs/src/src/gas/symbols.c,v retrieving revision 1.74 diff -u -p -r1.74 symbols.c --- symbols.c 9 Jan 2006 17:14:40 -0000 1.74 +++ symbols.c 1 May 2006 04:47:07 -0000 @@ -336,10 +336,7 @@ colon (/* Just seen "x:" - rattle symbol || 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);