You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When attempting to build, I noticed this warning in cabal,
src/Dalvik/Instruction.hs:642:46: Warning:
Literal 240 is out of the Int8 range -128..127
src/Dalvik/Instruction.hs:646:50: Warning:
Literal 4294901760 is out of the Int32 range -2147483648..2147483647
src/Dalvik/Instruction.hs:651:42: Warning:
Literal 18446744069414584320 is out of the Int64 range -9223372036854775808..9223372036854775807
regarding these lines:
signExt4::Word8->Int8
signExt4 w = w' .|. (if w' .&.0x8/=0then0xF0{- 240 -}else0)
where w' =fromIntegral w
signExt16::Word32->Int32
signExt16 w = w' .|. (if w' .&.0x8000/=0then0xFFFF0000{-4294901760-}else0)
where w' =fromIntegral w
signExt32::Int64->Int64
signExt32 w =
w' .|. (if w' .&.0x80000000/=0then0xFFFFFFFF00000000{-18446744069414584320-}else0)
where w' =fromIntegral w
Is the intention here to make the these literals max bounds?
The text was updated successfully, but these errors were encountered:
The intent is for those literals to be unsigned values, but GHC is interpreting them as signed (it gets the right bit patterns, but issues the warning). Putting type annotations directly on them might work, but I'm not sure due to the desugaring of literals with fromIntegral. I will give that a shot sometime.
@atomb,
cc @travitch
When attempting to build, I noticed this warning in
cabal
,regarding these lines:
Is the intention here to make the these literals max bounds?
The text was updated successfully, but these errors were encountered: