Re: [PATCH] ambassador,firestream: "-1 >>" is implementation defined

2006-11-13 Thread David Miller
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

Re: [PATCH] ambassador,firestream: "-1 >>" is implementation defined

2006-11-13 Thread Al Viro
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

[PATCH] ambassador,firestream: "-1 >>" is implementation defined

2006-11-13 Thread Alexey Dobriyan
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