public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* Fix PR11834
@ 2010-07-23  6:46 Alan Modra
  0 siblings, 0 replies; only message in thread
From: Alan Modra @ 2010-07-23  6:46 UTC (permalink / raw)
  To: binutils

Applied.

	PR gas/11834
	* macro.c (macro_expand): Recover gracefully from named args that
	don't match params.

Index: gas/macro.c
===================================================================
RCS file: /cvs/src/src/gas/macro.c,v
retrieving revision 1.52
diff -u -p -r1.52 macro.c
--- gas/macro.c	20 Apr 2010 15:54:48 -0000	1.52
+++ gas/macro.c	23 Jul 2010 06:10:38 -0000
@@ -1072,9 +1072,13 @@ macro_expand (int idx, sb *in, macro_ent
 	  /* Lookup the formal in the macro's list.  */
 	  ptr = (formal_entry *) hash_find (m->formal_hash, sb_terminate (&t));
 	  if (!ptr)
-	    as_bad (_("Parameter named `%s' does not exist for macro `%s'"),
-		    t.ptr,
-		    m->name);
+	    {
+	      as_bad (_("Parameter named `%s' does not exist for macro `%s'"),
+		      t.ptr,
+		      m->name);
+	      sb_reset (&t);
+	      idx = get_any_string (idx + 1, in, &t);
+	    }
 	  else
 	    {
 	      /* Insert this value into the right place.  */

-- 
Alan Modra
Australia Development Lab, IBM

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2010-07-23  6:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-07-23  6:46 Fix PR11834 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).