From a61ce4a4fd8d6971553c3921af9e11abf16c19b1 Mon Sep 17 00:00:00 2001 From: panne Date: Thu, 15 Jul 1999 16:11:29 +0000 Subject: [PATCH] [project @ 1999-07-15 16:11:29 by panne] 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. --- ghc/includes/StgTypes.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ghc/includes/StgTypes.h b/ghc/includes/StgTypes.h index 3470d70..da20c33 100644 --- a/ghc/includes/StgTypes.h +++ b/ghc/includes/StgTypes.h @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $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 * @@ -132,7 +132,7 @@ typedef StgWord64 LW_; */ 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) /* -- 1.7.10.4