aboutsummaryrefslogtreecommitdiff
path: root/gas/input-scrub.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2021-11-18 16:48:19 +0000
committerNick Clifton <nickc@redhat.com>2021-11-18 16:48:19 +0000
commit578c64a45a0e47fd0af53c77339ec0c26ef4874a (patch)
treeb95f61afc34286ad08556eb14848e9ba2d0123a1 /gas/input-scrub.c
parent76eb8ef1ce470ca71b10fae721e32d49998d87b9 (diff)
downloadgdb-578c64a45a0e47fd0af53c77339ec0c26ef4874a.zip
gdb-578c64a45a0e47fd0af53c77339ec0c26ef4874a.tar.gz
gdb-578c64a45a0e47fd0af53c77339ec0c26ef4874a.tar.bz2
Add multibyte character warning option to the assembler.
* as.c (parse_args): Add support for --multibyte-handling. * as.h (multibyte_handling): Declare. * app.c (scan_for_multibyte_characters): New function. (do_scrub_chars): Call the new function if multibyte warning is enabled. * input-scrub,c (input_scrub_next_buffer): Call the multibyte scanning function if multibyte warnings are enabled. * symbols.c (struct symbol_flags): Add multibyte_warned bit. (symbol_init): Call the multibyte scanning function if multibyte symbol warnings are enabled. (S_SET_SEGMENT): Likewise. * NEWS: Mention the new feature. * doc/as.texi: Document the new feature. * testsuite/gas/all/multibyte.s: New test source file. * testsuite/gas/all/multibyte1.d: New test driver file. * testsuite/gas/all/multibyte1.l: New test expected output. * testsuite/gas/all/multibyte2.d: New test driver file. * testsuite/gas/all/multibyte2.l: New test expected output. * testsuite/gas/all/gas.exp: Run the new tests.
Diffstat (limited to 'gas/input-scrub.c')
-rw-r--r--gas/input-scrub.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/gas/input-scrub.c b/gas/input-scrub.c
index b93afb2..c665402 100644
--- a/gas/input-scrub.c
+++ b/gas/input-scrub.c
@@ -377,6 +377,11 @@ input_scrub_next_buffer (char **bufp)
++p;
}
+ if (multibyte_handling == multibyte_warn)
+ (void) scan_for_multibyte_characters ((const unsigned char *) p,
+ (const unsigned char *) limit,
+ true /* Generate warnings */);
+
/* We found a newline in the newly read chars. */
partial_where = p;
partial_size = limit - p;