[GHC] #13107: Negative literal equal to minBound gives a spurious warning
GHC
ghc-devs at haskell.org
Wed Jan 18 13:59:48 UTC 2017
#13107: Negative literal equal to minBound gives a spurious warning
-------------------------------------+-------------------------------------
Reporter: erikd | Owner:
Type: bug | Status: closed
Priority: normal | Milestone:
Component: Compiler | Version: 8.0.1
Resolution: invalid | Keywords:
Operating System: Unknown/Multiple | Architecture:
Type of failure: Incorrect | Unknown/Multiple
error/warning at compile-time | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Changes (by rwbarton):
* status: new => closed
* resolution: => invalid
Comment:
I don't see the problem here, although the warning requires careful
reading.
`-128` is the application of unary minus to the literal `128`. The literal
`128` that you wrote does indeed lie outside of the `Int8` range as the
warning states. And the warning even suggested turning on
`NegativeLiterals`.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13107#comment:2>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list