Hi,
On Mon, 11 Jul 2011, Richard Guenther wrote:
> The following actually works.
>
> Bootstrapped and tested on x86_64-unknown-linux-gnu.
>
> Can you double-check it?
Seems sensible. Given this:
short s;
int i;
for (s = 0; s <= 127; s++)
i += (signed char)(unsigned char)s;
return i;
(or similar), does it remove the conversions to signed and unsigned char
now? And does it _not_ remove them if the upper bound is 128, or the
lower bound is -1 ?
Similar (now with extensions):
signed char c;
unsigned u;
for (c = 1; c < 127; c++)
u += (unsigned)(int)c;
The conversion to int is not necessary; but it is when the lower bound
is -1.
Ciao,
Michael.