summaryrefslogtreecommitdiff
path: root/gas/macro.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2010-04-20 15:54:47 +0000
committerNick Clifton <nickc@redhat.com>2010-04-20 15:54:47 +0000
commitf8e92af6fa67fe8a785ac409aa02086a93828c23 (patch)
tree0b9da60754f703a7c32fca1b628ffba341145715 /gas/macro.c
parent4432bd56e335fa7ae864624d517f9e58d678e54d (diff)
downloadbinutils-redhat-f8e92af6fa67fe8a785ac409aa02086a93828c23.tar.gz
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 b5c1824d2f..97f341473d 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,