[GHC] #7895: Warning for literal overflow

GHC cvs-ghc at haskell.org
Tue May 7 20:53:20 CEST 2013


#7895: Warning for literal overflow
-----------------------------+----------------------------------------------
Reporter:  acube             |          Owner:                  
    Type:  feature request   |         Status:  new             
Priority:  normal            |      Component:  Compiler        
 Version:  7.6.3             |       Keywords:                  
      Os:  Unknown/Multiple  |   Architecture:  Unknown/Multiple
 Failure:  Other             |      Blockedby:                  
Blocking:                    |        Related:                  
-----------------------------+----------------------------------------------
 Using ghc 7.6.3, the following compiles without warnings on -Wall:

 {{{
 import Data.Word

 test :: Word8
 test = 300

 main = print test
 }}}

 I expected this to issue a warning like: "Warning: literal overflow on
 line 4". I know GCC for example does this and it would be nice if GHC did
 this too.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/7895>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler



More information about the ghc-tickets mailing list