This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
| Other format: | [Raw text] | |
On Sun, May 18, 2008 at 11:24 AM, John Kacur <jkacur@gmail.com> wrote:
> int main(void)
> {
> unsigned j = ~0 >> 8;
The above is signed right shift which will keep the sign bit and replicate it.
> unsigned i = ~0;
> i >>= 8;
While this is an unsigned right shift.
-- Pinski
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |