]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
gas: consistently drop trailing whitespace when scrubbing
authorJan Beulich <jbeulich@suse.com>
Fri, 19 Jul 2024 09:54:09 +0000 (11:54 +0200)
committerJan Beulich <jbeulich@suse.com>
Fri, 19 Jul 2024 09:54:09 +0000 (11:54 +0200)
commit0d96d156aca0aa022f174be4add3d3cb56d7f6b7
treeea3e58d79d83bd525bcb964bda2e900a1614d92f
parentda0fa10a4e0967be13cfa86a64a992602161b31d
gas: consistently drop trailing whitespace when scrubbing

From especially the checks for the two separator forms it appears to
follow that the construct being touched is about trailing whitespace. In
such a case, considering that for many targets ordinary and line comment
chars overlap, take into account that line comment chars override
ordinary ones in lex[] (logic elsewhere in do_scrub_chars() actually
depends on that ordering, and also accounts for this overriding).

Plus of course IS_NEWLINE() would better also be consulted. Note also
that the DOUBLESLASH_LINE_COMMENTS change should generally have no
effect just yet; it's a prereq for a later change but better fits here.

Leave respective comments as well, and update documentation to correct
which comment form is actually replaced by a single blank (i.e. neither
the ones starting with what {,tc_}comment_chars[] has nor the ones
starting with what line_comment_chars[] has).
gas/app.c
gas/doc/as.texi
gas/testsuite/gas/mips/mips16-32@mips16-insn-e.l
gas/testsuite/gas/mips/mips16-64@mips16-insn-e.l
gas/testsuite/gas/mips/mips16-insn-e.l
gas/testsuite/gas/mips/mips16e-32@mips16-insn-e.l
gas/testsuite/gas/mips/mips16e2-32@mips16-insn-e.l
gas/testsuite/gas/mips/mips16e2-interaptiv-mr2@mips16-insn-e.l