]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
gas: adjust impossible/bogus M68K/MRI special case when scrubbing
authorJan Beulich <jbeulich@suse.com>
Fri, 19 Jul 2024 09:54:45 +0000 (11:54 +0200)
committerJan Beulich <jbeulich@suse.com>
Fri, 19 Jul 2024 09:54:45 +0000 (11:54 +0200)
State 1 is uniformly handled further up. And it is highly questionable
that in state 10 (i.e. after having seen not only a possible label, but
also an opcode), which is about to go away anyway, a line comment char
could still be meant to take effect. With the state checking dropped,
the immediately preceding logic can then also be simplified.

gas/app.c

index e580e0f8e583956987f6ae96680ec36aeb4ea003..6a3efb1f687f7dadd4b7bb80a78970367c1f395b 100644 (file)
--- a/gas/app.c
+++ b/gas/app.c
@@ -1368,14 +1368,10 @@ do_scrub_chars (size_t (*get) (char *, size_t), char *tostart, size_t tolen,
             start of a line.  If this is also a normal comment
             character, fall through.  Otherwise treat it as a default
             character.  */
-         if (strchr (tc_comment_chars, ch) == NULL
-             && (! scrub_m68k_mri
-                 || (ch != '!' && ch != '*')))
+         if (strchr (tc_comment_chars, ch) == NULL)
            goto de_fault;
          if (scrub_m68k_mri
-             && (ch == '!' || ch == '*' || ch == '#')
-             && state != 1
-             && state != 10)
+             && (ch == '!' || ch == '*' || ch == '#'))
            goto de_fault;
          /* Fall through.  */
        case LEX_IS_COMMENT_START: