From: Al Viro <[EMAIL PROTECTED]>
Date: Mon, 13 Nov 2006 20:26:56 +
> On Mon, Nov 13, 2006 at 11:22:00PM +0300, Alexey Dobriyan wrote:
> > 6.5.7(5): The result of E1 >> E2 is E1 right-shifted E2 bit positions.
> > ...
> > If E1 has a signed type and a negative value, the result
On Mon, Nov 13, 2006 at 11:22:00PM +0300, Alexey Dobriyan wrote:
> 6.5.7(5): The result of E1 >> E2 is E1 right-shifted E2 bit positions.
> ...
> If E1 has a signed type and a negative value, the resulting value
> is implementation defined.
>
> So, cast -1 to unsigned typ
6.5.7(5): The result of E1 >> E2 is E1 right-shifted E2 bit positions.
...
If E1 has a signed type and a negative value, the resulting value
is implementation defined.
So, cast -1 to unsigned type to make result well-defined.
Signed-off-by: Alexey Dobriyan <[EMAIL