From: Al Viro <viro@ftp.linux.org.uk>
To: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Chas Williams <chas@cmf.nrl.navy.mil>,
netdev@vger.kernel.org, Andrew Morton <akpm@osdl.org>
Subject: Re: [PATCH] ambassador,firestream: "-1 >>" is implementation defined
Date: Mon, 13 Nov 2006 20:26:56 +0000 [thread overview]
Message-ID: <20061113202656.GT29920@ftp.linux.org.uk> (raw)
In-Reply-To: <20061113202200.GA4971@martell.zuzino.mipt.ru>
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 type to make result well-defined.
Or just use ~0U and be done with that.
next prev parent reply other threads:[~2006-11-13 20:27 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-13 20:22 [PATCH] ambassador,firestream: "-1 >>" is implementation defined Alexey Dobriyan
2006-11-13 20:26 ` Al Viro [this message]
2006-11-14 0:12 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20061113202656.GT29920@ftp.linux.org.uk \
--to=viro@ftp.linux.org.uk \
--cc=adobriyan@gmail.com \
--cc=akpm@osdl.org \
--cc=chas@cmf.nrl.navy.mil \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).