This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Fix PR11834


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]