------- Comment #14 from photon at seznam dot cz 2009-07-15 18:24 -------
(In reply to comment #13)
> Or rather from SCHAR_MAX + 1 to SCHAR_MIN :). Since it is 0x7F + 1 ==
> (int)0x80. So we have a negative value now from a positive value.
>
This occurs regardless of the implicit conversion. The implicit conversion
cannot alter the result. Therefore, the warning is false in this case too.
{
char c = 0x7f;
++c;
// c is 0x80 here
c = 0x7f;
c = (int)c + 1;
// c is 0x80 here
}
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40752