From: Jan Beulich Date: Fri, 16 May 2025 10:32:39 +0000 (+0200) Subject: gas: adjust a comparison in s_align() X-Git-Tag: binutils-2_45~568 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=04451000ebbd5e423cb5a7023fc992a6dd7e60cc;p=thirdparty%2Fbinutils-gdb.git 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 --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;