64 Bits in an 'unsigned long long'

From: Tony Robbins (tonyr@pacific101.com)
Date: 05/08/99


Alright, I've been using unsigned long long's for flags since I put in the
pre-bpl15 patch last August.
(See 'typedef unsigned long long        bitvector_t;' in structs.h)

Recently, I put these to the test, and surprisingly, GCC spit out some
warnings when going beyond the first 32.

warning: left shift count >= width of type.

Then, now non-surprisingly, when I used OEDIT to set the extra flags beyond
32, it simply wraps around (so the 34th bit actually sets the second bit).
Anyway, I was hoping someone can shed some light on this.

It should be noted that GCC was recently updated to 2.8.1 from 2.7.2[1], but
when using the old compiler, the same result arose.

-k.

1 - Probably not the correct version numbers, but very close.


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     |  http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html  |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/15/00 PST