diff options
author | Nick Clifton <nickc@redhat.com> | 2007-01-12 10:57:02 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2007-01-12 10:57:02 +0000 |
commit | 465e5617233fc7b7278fe82fddeb6f19064c7338 (patch) | |
tree | b82099a6df8eaa84b9ca11b699463cc9f1c2d899 /gas/macro.c | |
parent | e8630bd766eb1fbaa68b1dd2c50b9105bf1bbc87 (diff) | |
download | gdb-465e5617233fc7b7278fe82fddeb6f19064c7338.zip gdb-465e5617233fc7b7278fe82fddeb6f19064c7338.tar.gz gdb-465e5617233fc7b7278fe82fddeb6f19064c7338.tar.bz2 |
PR gas/3856
* macro.c (expand_irp): Do not ignore spaces inside quoted strings.
Diffstat (limited to 'gas/macro.c')
-rw-r--r-- | gas/macro.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/gas/macro.c b/gas/macro.c index 67846eb..d7d470b 100644 --- a/gas/macro.c +++ b/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] == '"') - ++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); } } |