We have to be very careful with numeric literals in the C part, in
this case 0xff (of type int = 4 bytes on Alpha) was shifted left 56
times => always zero :-{ Using an L or UL suffix is not always
practical, because the needed size depends on conditional typedefs
somewhere else. Solution: Cast! :-P ghc/includes contains some more
suspicious literals, but I did not have a look at them yet.
/* -----------------------------------------------------------------------------
- * $Id: StgTypes.h,v 1.5 1999/03/02 19:44:21 sof Exp $
+ * $Id: StgTypes.h,v 1.6 1999/07/15 16:11:29 panne Exp $
*
* (c) The GHC Team, 1998-1999
*
*/
typedef StgWord StgStablePtr;
-#define STABLEPTR_WEIGHT_MASK (0xff << ((sizeof(StgWord)-1) * BITS_PER_BYTE))
+#define STABLEPTR_WEIGHT_MASK ((StgWord)0xff << ((sizeof(StgWord)-1) * BITS_PER_BYTE))
#define STABLEPTR_WEIGHT_SHIFT (BITS_IN(StgWord) - 8)
/*