https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100442

--- Comment #4 from Andres Freund <andres at anarazel dot de> ---
> Ending up with an excessive range isn't uncommon in code that freely converts 
> between signed and unsigned integers (e.g., by passing an int to a size_t 
> argument) and involves conditionals like those in tsCompareString().  GCC 
> must assume the signed integers may be negative and convert to very large 
> positive values.  Changing tsCompareString() to take size_t arguments instead 
> of int avoids the warning:

That true - and I agree that that code isn't great.

But the warning message is quite confusing: A bound of "[18446744073709551612,
18446744073709551615]" doesn't sound right from the perspective a compiler
user, rather than compiler author. Clearly the lower bound isn't actually
18446744073709551612.

Reply via email to