Mo DeJong wrote:
long val2 = 1; /* incorrect warn when val2 is a long */ int c2 = ( ((long long) val2) < ((long long)(-2147483647L - 1)) );
The result of the compare will always be false, so the warning is correct.The long variable val2 can not hold a value smaller than LONG_MIN. Adding casts to long long does not change this fact.
-- Jim Wilson, GNU Tools Support, http://www.specifix.com