[prev in list] [next in list] [prev in thread] [next in thread] 

List:       suse-programming-e
Subject:    Re: [suse-programming-e] Strange behaviour of >> ?
From:       Jerry Feldman <gaf () blu ! org>
Date:       2005-07-21 21:05:33
Message-ID: 200507211705.33223.gaf () blu ! org
[Download RAW message or body]

On Thursday 21 July 2005 4:46 pm, Philipp Thomas wrote:
> Jerry Feldman <gaf@blu.org> [Wed, 20 Jul 2005 10:29:44 -0400]:
> >On Wednesday 20 July 2005 5:57 am, Verdi March wrote:
> >
> >BTW: On a 64-bit system (Itanium) the values are both 0.
>
> Of cause! You'd obviously have to use
>
> unsigned int mask = (unsigned int) -1 >> 64;
> and
> unsigned int mask1 = ((unsigned int) -1) >> (64 - i);
True since on a 64-bit system (unsigned int) -1 might be promoted to an 
unsigned long, but I'm too lazy to look at the promotion rules in the 
standard right now. 
-- 
Jerry Feldman <gaf@blu.org>
Boston Linux and Unix user group
http://www.blu.org PGP key id:C5061EA9
PGP Key fingerprint:053C 73EC 3AC1 5C44 3E14 9245 FB00 3ED5 C506 1EA9

-- 
To unsubscribe, email: suse-programming-e-unsubscribe@suse.com
For additional commands, email: suse-programming-e-help@suse.com
Archives can be found at: http://lists.suse.com/archive/suse-programming-e

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic