Literal overflow test fails

Carter Schonwald carter.schonwald at gmail.com
Sun Aug 4 03:27:46 CEST 2013


Hey Simon

heres some info about whats happening, and it may point out whats different

http://stackoverflow.com/questions/384502/what-is-the-bit-size-of-long-on-64-bit-windows
namely: pointers on 64bit windows are 64bit, but c ints are 32bit

hope that helps!


On Sat, Aug 3, 2013 at 5:47 PM, Simon Peyton-Jones <simonpj at microsoft.com>wrote:

>  On 32 bit Windows I get this (with HEAD).****
>
> ** **
>
> libraries\Win32\Graphics\Win32\GDI\HDC.hs:145:14: Warning:****
>
>     Literal 2147483648 of type Int overflows****
>
> ** **
>
> The offending code is:****
>
> ** **
>
> setTextCharacterExtra dc extra =****
>
>   failIf (== 0x80000000) "SetTextCharacterExtra" $****
>
>     c_SetTextCharacterExtra dc extra****
>
> ** **
>
> The new literal-overflow test objects to 0x80000000 :: Int.  I’m not sure
> if it should object; in this case we are deliberately using the bit-pattern
> for minBound.****
>
> ** **
>
> Also what happens on a 64-bit architecture?****
>
> ** **
>
> What should the behaviour here be?   ****
>
> ** **
>
> - should we use minBound here?****
>
> - what should the new literal-overlflow code do for 0xblah constants?****
>
> ** **
>
> This is currently breaking the HEAD build.****
>
> ** **
>
> Simon****
>
> _______________________________________________
> ghc-devs mailing list
> ghc-devs at haskell.org
> http://www.haskell.org/mailman/listinfo/ghc-devs
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/ghc-devs/attachments/20130803/b7851125/attachment.htm>


More information about the ghc-devs mailing list