PR gas/3856
* macro.c (expand_irp): Do not ignore spaces inside quoted strings.
This commit is contained in:
parent
e8630bd766
commit
465e561723
2 changed files with 18 additions and 2 deletions
|
@ -1,3 +1,9 @@
|
|||
2007-01-12 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
PR gas/3856
|
||||
* macro.c (expand_irp): Do not ignore spaces inside quoted
|
||||
strings.
|
||||
|
||||
2007-01-12 Alan Modra <amodra@bigpond.net.au>
|
||||
|
||||
* config/tc-spu.h (TC_RELOC_RTSYM_LOC_FIXUP): Delete.
|
||||
|
|
12
gas/macro.c
12
gas/macro.c
|
@ -1325,8 +1325,14 @@ expand_irp (int irpc, int idx, sb *in, sb *out, int (*get_line) (sb *))
|
|||
}
|
||||
else
|
||||
{
|
||||
bfd_boolean in_quotes = FALSE;
|
||||
|
||||
if (irpc && in->ptr[idx] == '"')
|
||||
{
|
||||
in_quotes = TRUE;
|
||||
++idx;
|
||||
}
|
||||
|
||||
while (idx < in->len)
|
||||
{
|
||||
if (!irpc)
|
||||
|
@ -1337,6 +1343,9 @@ expand_irp (int irpc, int idx, sb *in, sb *out, int (*get_line) (sb *))
|
|||
{
|
||||
int nxt;
|
||||
|
||||
if (irpc)
|
||||
in_quotes = ! in_quotes;
|
||||
|
||||
nxt = sb_skip_white (idx + 1, in);
|
||||
if (nxt >= in->len)
|
||||
{
|
||||
|
@ -1348,12 +1357,13 @@ expand_irp (int irpc, int idx, sb *in, sb *out, int (*get_line) (sb *))
|
|||
sb_add_char (&f.actual, in->ptr[idx]);
|
||||
++idx;
|
||||
}
|
||||
|
||||
err = macro_expand_body (&sub, out, &f, h, 0);
|
||||
if (err != NULL)
|
||||
break;
|
||||
if (!irpc)
|
||||
idx = sb_skip_comma (idx, in);
|
||||
else
|
||||
else if (! in_quotes)
|
||||
idx = sb_skip_white (idx, in);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue