aboutsummaryrefslogtreecommitdiff
path: root/gas/app.c
diff options
context:
space:
mode:
authorSergey Belyashov <sergey.belyashov@gmail.com>2020-01-03 16:23:19 +0000
committerNick Clifton <nickc@redhat.com>2020-01-03 16:23:19 +0000
commit16d87673993dc1dba10cd86996a9b016af38da12 (patch)
tree85dbb6aba85b82d6847e3092d95e4f4fb3e281d6 /gas/app.c
parentf2a3559d54602cecfec6d90f792be4a70ad918ab (diff)
downloadgdb-16d87673993dc1dba10cd86996a9b016af38da12.zip
gdb-16d87673993dc1dba10cd86996a9b016af38da12.tar.gz
gdb-16d87673993dc1dba10cd86996a9b016af38da12.tar.bz2
Allow individual targets to decide if string escapes should be allowed. Disable for PPC and Z80.
PR 25311 * as.h (TC_STRING_ESCAPES): Provide a default definition. * app.c (do_scrub_chars): Use TC_STRING_ESCAPES instead of NO_STRING_ESCAPES. * read.c (next_char_of_string): Likewise. * config/tc-ppc.h (TC_STRING_ESCAPES): Define. * config/tc-z80.h (TC_STRING_ESCAPES): Define.
Diffstat (limited to 'gas/app.c')
-rw-r--r--gas/app.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/gas/app.c b/gas/app.c
index 1bef63e..00c31bb 100644
--- a/gas/app.c
+++ b/gas/app.c
@@ -602,13 +602,11 @@ do_scrub_chars (size_t (*get) (char *, size_t), char *tostart, size_t tolen)
state = old_state;
PUT (ch);
}
-#ifndef NO_STRING_ESCAPES
- else if (ch == '\\')
+ else if (TC_STRING_ESCAPES && ch == '\\')
{
state = 6;
PUT (ch);
}
-#endif
else if (scrub_m68k_mri && ch == '\n')
{
/* Just quietly terminate the string. This permits lines like