Literal overflow test fails
Simon Peyton-Jones
simonpj at microsoft.com
Sat Aug 3 23:47:07 CEST 2013
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/ghc-devs/attachments/20130803/25b6faa4/attachment.htm>
More information about the ghc-devs
mailing list