From: Alan Modra Date: Fri, 23 Jul 2010 06:44:25 +0000 (+0000) Subject: PR gas/11834 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c0ba1095fd73bd3456b49bf86ef526f2bab46908;p=binutils-gdb.git PR gas/11834 * macro.c (macro_expand): Recover gracefully from named args that don't match params. --- diff --git a/gas/ChangeLog b/gas/ChangeLog index 5d543f9c436..a157d027683 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,9 @@ +2010-07-23 Alan Modra + + PR gas/11834 + * macro.c (macro_expand): Recover gracefully from named args that + don't match params. + 2010-07-22 Thomas Schwinge Switch MIPS to 32-bit DWARF format. diff --git a/gas/macro.c b/gas/macro.c index 97f341473d6..3e3ffb11f57 100644 --- a/gas/macro.c +++ b/gas/macro.c @@ -1072,9 +1072,13 @@ macro_expand (int idx, sb *in, macro_entry *m, sb *out) /* 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. */