]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Sparc: use is_end_of_stmt()
authorJan Beulich <jbeulich@suse.com>
Fri, 7 Mar 2025 07:17:54 +0000 (08:17 +0100)
committerJan Beulich <jbeulich@suse.com>
Fri, 7 Mar 2025 07:17:54 +0000 (08:17 +0100)
... instead of open-coding it. This also fixes two array underrun
issues, when plain char is a signed type.

gas/config/tc-sparc.c

index a22efbf5debd5f29b7495ad080fea13b66489810..e303169e73d2e9d349e68bd86adb3497af318320 100644 (file)
@@ -4450,7 +4450,7 @@ s_data1 (void)
 static void
 s_proc (int ignore ATTRIBUTE_UNUSED)
 {
-  while (!is_end_of_line[(unsigned char) *input_line_pointer])
+  while (!is_end_of_stmt (*input_line_pointer))
     {
       ++input_line_pointer;
     }
@@ -4817,7 +4817,7 @@ sparc_cons (expressionS *exp, int size)
              char *end = ++input_line_pointer;
              int npar = 0;
 
-             while (! is_end_of_line[(c = *end)])
+             while (! is_end_of_stmt (c = *end))
                {
                  if (c == '(')
                    npar++;
@@ -4848,7 +4848,7 @@ sparc_cons (expressionS *exp, int size)
                      input_line_pointer++;
                      SKIP_WHITESPACE ();
                      c = *input_line_pointer;
-                     if (! is_end_of_line[c] && c != ',')
+                     if (! is_end_of_stmt (c) && c != ',')
                        as_bad (_("Illegal operands: garbage after %%r_%s%d()"),
                                sparc_cons_special_reloc, size * 8);
                    }