[CODE] RE:warning: left shift count >= width of type

From: Joakim Helgesson (joakim_helgesson@HOTMAIL.COM)
Date: 11/16/97


>      (IS_OBJ_STAT(obj, ITEM_ANTI_OGRE) && IS_OGRE(ch)) ||
>
>It gives me the following errors:
>
>class.c:665: warning: left shift count >= width of type
>class.c:666: warning: suggest parentheses around && within ||

Have you by any chance defined any of the ITEM_ANTI_* to
be (1<<32) or greater (ie (1<<33)...)? That would explain the
left shift (<<) warning.
And of course the point is that the storage variable for the
flags is a long, that is 32 bits, so having more than 32 flags
will be a problem...

Joakim

______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com


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



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