Re: Bit Flags

From: Mike Breuer (mbreuer@new.rr.com)
Date: 06/06/01


----- Original Message -----
From: "Peter Ajamian" <peter@PAJAMIAN.DHS.ORG>
Sent: Wednesday, June 06, 2001 1:22 AM


> Mike Breuer wrote:
> >
> > 1 is assumed by the compiler to be an integer, and then left shifted 32
> > positions which should result in 0 on a 32-bit platform.  To get around
this,
> > I created a macro:
>
> You don't need a macro, (1ULL << 32) works fine.

I wrote the email hastily, and did not explain that I cast off to bitvector_t,
and not unsigned long long, making the macro convenient for me.  Technically,
I could still put in 1ULL since bitvector_t is a typedef of unsigned long
long, so it basically comes down to a question of coding style/preference.

Mike

--
   +---------------------------------------------------------------+
   | FAQ: http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html |
   | Archives: http://post.queensu.ca/listserv/wwwarch/circle.html |
   +---------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/05/01 PST