[binutils-gdb] gas: adjust a comparison in s_align()
Jan Beulich
jbeulich@sourceware.org
Fri May 16 10:34:57 GMT 2025
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=04451000ebbd5e423cb5a7023fc992a6dd7e60cc
commit 04451000ebbd5e423cb5a7023fc992a6dd7e60cc
Author: Jan Beulich <jbeulich@suse.com>
Date: Fri May 16 12:32:39 2025 +0200
gas: adjust a comparison in s_align()
In 344b1e0f5f79 ("gas: range-check 3rd argument of .align et al") I
neglected to consider compilers which warn about signed/unsigned
mismatches in comparisons (which is somewhat odd when the signed value is
already known to be non-negative).
Diff:
---
gas/read.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gas/read.c b/gas/read.c
index 0b817b790a1..a73e814324b 100644
--- a/gas/read.c
+++ b/gas/read.c
@@ -1600,7 +1600,7 @@ s_align (signed int arg, int bytes_p)
++input_line_pointer;
offsetT val = get_absolute_expression ();
max = val;
- if (val < 0 || max != val)
+ if (val < 0 || max != (valueT) val)
{
as_warn (_("ignoring out of range alignment maximum"));
max = 0;
More information about the Binutils-cvs
mailing list