aboutsummaryrefslogtreecommitdiff
path: root/gas/macro.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2010-04-20 15:54:48 +0000
committerNick Clifton <nickc@redhat.com>2010-04-20 15:54:48 +0000
commitaa27de954944df9e1af7c689ed6bbdf07a7b3ad0 (patch)
tree14e8bacebbd1e4822f4584300c6e7173f112fc5e /gas/macro.c
parent1c07cc19039fc86c4f857fae766f02f5452a9a22 (diff)
downloadgdb-aa27de954944df9e1af7c689ed6bbdf07a7b3ad0.zip
gdb-aa27de954944df9e1af7c689ed6bbdf07a7b3ad0.tar.gz
gdb-aa27de954944df9e1af7c689ed6bbdf07a7b3ad0.tar.bz2
PR gas/11507
* macro.c (macro_expand_body): Do not treat LOCAL as a keyword in altmacro mode if found inside a quoted string. * gas/macros/altmacro.s: New test. * gas/macros/altmacro.d: Expected output.
Diffstat (limited to 'gas/macro.c')
-rw-r--r--gas/macro.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gas/macro.c b/gas/macro.c
index b5c1824..97f3414 100644
--- a/gas/macro.c
+++ b/gas/macro.c
@@ -868,7 +868,9 @@ macro_expand_body (sb *in, sb *out, formal_entry *formals,
if (! macro
|| src + 5 >= in->len
|| strncasecmp (in->ptr + src, "LOCAL", 5) != 0
- || ! ISWHITE (in->ptr[src + 5]))
+ || ! ISWHITE (in->ptr[src + 5])
+ /* PR 11507: Skip keyword LOCAL if it is found inside a quoted string. */
+ || inquote)
{
sb_reset (&t);
src = sub_actual (src, in, &t, formal_hash,