[binutils-gdb] Arm: use is_end_of_stmt()

Jan Beulich jbeulich@sourceware.org
Fri Mar 7 07:13:03 GMT 2025


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=41241256243a266bfe9a46d14aac148e1df88bcd

commit 41241256243a266bfe9a46d14aac148e1df88bcd
Author: Jan Beulich <jbeulich@suse.com>
Date:   Fri Mar 7 08:10:35 2025 +0100

    Arm: use is_end_of_stmt()
    
    ... instead of open-coding it. This also fixes an array underrun issue:
    The wrong casting to plain int could have yielded negative values when
    plain char is a signed type.

Diff:
---
 gas/config/tc-arm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gas/config/tc-arm.c b/gas/config/tc-arm.c
index add9b77ab17..ed910b857df 100644
--- a/gas/config/tc-arm.c
+++ b/gas/config/tc-arm.c
@@ -3668,7 +3668,7 @@ tc_start_label_without_colon (void)
     {
       const char *label = input_line_pointer;
 
-      while (!is_end_of_line[(int) label[-1]])
+      while (!is_end_of_stmt (label[-1]))
 	--label;
 
       if (*label == '.')


More information about the Binutils-cvs mailing list