]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
gas: avoid (scrubber) diagnostics for stuff past .end
authorJan Beulich <jbeulich@suse.com>
Wed, 11 Sep 2024 11:56:36 +0000 (13:56 +0200)
committerJan Beulich <jbeulich@suse.com>
Wed, 11 Sep 2024 11:56:36 +0000 (13:56 +0200)
commit6fc346a4b39f7658e99522529308a23b8543ffe3
tree7be76ed44066c886ee2fdfb4ce9811efb506dc8f
parent5d2142f10e70183d438a6a85c40aba66c8abc099
gas: avoid (scrubber) diagnostics for stuff past .end

What's past an active .end directive (when that has its default purpose)
is supposed to be entirely ignored. That should be true not just for
regular processing, but also for "pre-processing" (aka scrubbing). A
complication is that such a directive may of course occur inside a
(false) conditional or a macro definition. To deal with that make sure
we can continue as usual if called another time.

Note however that .end inside a macro will still have the full macro
body expanded; dealing with that would require further (perhaps
intrusive) adjustments in sb_scrub_and_add_sb() and/or callers thereof.
However, at least some of the warnings issued by do_scrub_chars() are
unlikely to occur when expanding a macro. (If we needed to go that far,
presumably .exitm would also want recognizing.)
gas/app.c
gas/testsuite/gas/all/end-no-dot.l [new file with mode: 0644]
gas/testsuite/gas/all/end-no-dot.s [new file with mode: 0644]
gas/testsuite/gas/all/end.l [new file with mode: 0644]
gas/testsuite/gas/all/end.s [new file with mode: 0644]
gas/testsuite/gas/all/gas.exp