Commit: GAS: Add option to warn about multibyte characters
Nick Clifton
nickc@redhat.com
Thu Nov 18 16:47:51 GMT 2021
Hi Guys,
I am applying the patch below to add a new option to the assembler.
The option enables the generation of warning messages when multibyte
characters are found in the input. It has two modes, in the first it
will warn about multibyte characters detected anywhere in the input
stream. In the second mode the warnings are only generated when
multibyte characters are used in the names of defined symbols. The
point of the second mode is that whilst there may be good reasons for
multibyte characters to appear in the input - in comments, output
strings, and so on, it is rare that they will be used in symbol names.
Cheers
Nick
gas/ChangeLog
2021-11-18 Nick Clifton <nickc@redhat.com>
* 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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gas.multibyte.patch
Type: text/x-patch
Size: 14719 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20211118/ec41d050/attachment.bin>
More information about the Binutils
mailing list