+2010-08-18 Alan Modra <amodra@gmail.com>
+
+ * macro.c (sub_actual): Add back ampersand suffix when no
+ substitution.
+ (macro_expand_body): Correct comment.
+
2010-08-17 Roland McGrath <roland@redhat.com>
* config/obj-elf.c (obj_elf_parse_section_letters): Take new
/* Doing this permits people to use & in macro bodies. */
sb_add_char (out, '&');
sb_add_sb (out, t);
+ if (src != start && in->ptr[src - 1] == '&')
+ sb_add_char (out, '&');
}
else if (copyifnotthere)
{
}
else
{
- /* FIXME: Why do we do this? */
- /* At least in alternate mode this seems correct; without this
- one can't append a literal to a parameter. */
+ /* Permit macro parameter substition delineated with
+ an '&' prefix and optional '&' suffix. */
src = sub_actual (src + 1, in, &t, formal_hash, '&', out, 0);
}
}