[GHC] #13257: out-of-range warnings for negative literals, without -XNegativeLiterals

GHC ghc-devs at haskell.org
Mon Mar 12 18:30:10 UTC 2018


#13257: out-of-range warnings for negative literals, without -XNegativeLiterals
-------------------------------------+-------------------------------------
        Reporter:  rwbarton          |                Owner:  ruperthorlick
            Type:  feature request   |               Status:  patch
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  8.1
      Resolution:                    |             Keywords:  newcomer
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
                                     |  deSugar/should_compile/T13257
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):  Phab:D3281
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by monoidal):

 Is it correct not to warn about `-128 :: Int8` when `-XNegativeLiterals`
 is off? After all, without -XNegativeLiterals this means creating the
 overflowed integer `128 :: Int8` and only then negating it.

-- 
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13257#comment:5>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list