public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Alan Modra <amodra@bigpond.net.au>
To: binutils@sources.redhat.com
Cc: Geoff Keating <geoffk@geoffk.org>
Subject: Re: Fix PR gas/827
Date: Sat, 09 Apr 2005 06:20:00 -0000	[thread overview]
Message-ID: <20050409062046.GU29412@bubble.modra.org> (raw)
In-Reply-To: <20050409023017.GT29412@bubble.modra.org>

I somehow managed to post and commit an untested patch, thinking I'd
tested the patch last night.  It didn't even compile.  :-(

Since geoffk had the repo locked when I first tried to commit this fix,
I've probably broken the gcc bootstrap tester.  Sorry.

	* read.c (assign_symbol): Remove const from parm.  Fix xcalloc
	call.  Don't do the COFF hacks for multi-emulation gas.  Move
	demand_empty_rest_of_line back to caller.
	(s_set, equals): demand_empty_rest_of_line here.

Index: gas/read.c
===================================================================
RCS file: /cvs/src/src/gas/read.c,v
retrieving revision 1.95
diff -u -p -r1.95 read.c
--- gas/read.c	9 Apr 2005 03:48:09 -0000	1.95
+++ gas/read.c	9 Apr 2005 06:15:13 -0000
@@ -2748,7 +2748,7 @@ end_repeat (int extra)
 }
 
 static void
-assign_symbol (const char *name, int no_reassign)
+assign_symbol (char *name, int no_reassign)
 {
   symbolS *symbolP;
 
@@ -2777,18 +2777,15 @@ assign_symbol (const char *name, int no_
       if (listing & LISTING_SYMBOLS)
 	{
 	  extern struct list_info_struct *listing_tail;
-	  fragS *dummy_frag = (fragS *) xcalloc (sizeof (fragS));
+	  fragS *dummy_frag = (fragS *) xcalloc (1, sizeof (fragS));
 	  dummy_frag->line = listing_tail;
 	  dummy_frag->fr_symbol = symbolP;
 	  symbol_set_frag (symbolP, dummy_frag);
 	}
 #endif
-#if defined (OBJ_COFF) || defined (OBJ_MAYBE_COFF)
-#if defined (BFD_ASSEMBLER) && defined (OBJ_MAYBE_COFF)
-      if (OUTPUT_FLAVOR == bfd_target_coff_flavour)
-#endif
-	/* "set" symbols are local unless otherwise specified.  */
-	SF_SET_LOCAL (symbolP);
+#ifdef OBJ_COFF
+      /* "set" symbols are local unless otherwise specified.  */
+      SF_SET_LOCAL (symbolP);
 #endif
     }
 
@@ -2799,8 +2796,6 @@ assign_symbol (const char *name, int no_
     as_bad (_("symbol `%s' is already defined"), name);
 
   pseudo_set (symbolP);
-
-  demand_empty_rest_of_line ();
 }
 
 /* Handle the .equ, .equiv and .set directives.  If EQUIV is 1, then
@@ -2845,6 +2840,8 @@ s_set (int equiv)
 
   assign_symbol (name, equiv);
   *end_name = delim;
+
+  demand_empty_rest_of_line ();
 }
 
 void
@@ -4923,7 +4920,10 @@ equals (char *sym_name, int reassign)
   assign_symbol (sym_name, !reassign);
 
   if (flag_mri)
-    mri_comment_end (stop, stopc);
+    {
+      demand_empty_rest_of_line ();
+      mri_comment_end (stop, stopc);
+    }
 }
 
 /* .incbin -- include a file verbatim at the current location.  */

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre

  reply	other threads:[~2005-04-09  6:20 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-06  8:12 Alan Modra
2005-04-06 14:06 ` Ian Lance Taylor
2005-04-09  2:30   ` Alan Modra
2005-04-09  6:20     ` Alan Modra [this message]
2005-04-15  6:14       ` Alan Modra

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050409062046.GU29412@bubble.modra.org \
    --to=amodra@bigpond.net.au \
    --cc=binutils@sources.redhat.com \
    --cc=geoffk@geoffk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).