]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
gas: sframe: do not test whether offsetT exceeds INT64_MIN..INT64_MAX
authorJens Remus <jremus@linux.ibm.com>
Tue, 13 Jan 2026 13:14:43 +0000 (14:14 +0100)
committerJens Remus <jremus@linux.ibm.com>
Tue, 13 Jan 2026 13:15:14 +0000 (14:15 +0100)
commit6b8fb74a9403092c4e4813c728e20ed10a84676f
tree2d4d2e75095da60ed538819eaea545c2327efab7
parent58008ed4e6afd77841c653eee60f60d621fa101a
gas: sframe: do not test whether offsetT exceeds INT64_MIN..INT64_MAX

A value of type offsetT, which is either a signed 32-bit or 64-bit
integer, cannot exceed the range of INT64_MIN..INT64_MAX.  This
resolves the following compile error:

../../binutils-gdb/gas/gen-sframe.c: In function ‘get_offset_size_in_bytes’:
../../binutils-gdb/gas/gen-sframe.c:213:45: error: comparison is always true due to limited range of data type [-Werror=type-limits]
  213 |   else if ((sizeof (offsetT) > 4) && (value <= INT64_MAX && value >= INT64_MIN))
      |                                             ^~
../../binutils-gdb/gas/gen-sframe.c:213:67: error: comparison is always true due to limited range of data type [-Werror=type-limits]
  213 |   else if ((sizeof (offsetT) > 4) && (value <= INT64_MAX && value >= INT64_MIN))
      |                                                                   ^~

Fixes: 58008ed4e6af ("gas: sframe: use standard min/max integer constants")
Signed-off-by: Jens Remus <jremus@linux.ibm.com>
gas/gen-sframe.c