From: Jakub Jelinek Date: Sat, 21 Jun 2025 14:09:08 +0000 (+0200) Subject: value-range: Use int instead of uint for wi::ctz result [PR120746] X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b76779c7cd6b92f167a80f16f11f599eea4dfc67;p=thirdparty%2Fgcc.git value-range: Use int instead of uint for wi::ctz result [PR120746] uint is some compatibility type in glibc sys/types.h enabled in misc/GNU modes, so it doesn't exist on many hosts. Furthermore, wi::ctz returns int rather than unsigned and the var is only used in comparison to zero or as second argument of left shift, so I think just using int instead of unsigned is better. 2025-06-21 Jakub Jelinek PR middle-end/120746 * value-range.cc (irange::snap): Use int type instead of uint. --- diff --git a/gcc/value-range.cc b/gcc/value-range.cc index ce13acc312d..23a5c66ed5e 100644 --- a/gcc/value-range.cc +++ b/gcc/value-range.cc @@ -2287,7 +2287,7 @@ bool irange::snap (const wide_int &lb, const wide_int &ub, wide_int &new_lb, wide_int &new_ub) { - uint z = wi::ctz (m_bitmask.mask ()); + int z = wi::ctz (m_bitmask.mask ()); if (z == 0) return false;