[GHC] #1042: Floating point exception
GHC
trac at galois.com
Thu Jan 4 10:37:48 EST 2007
#1042: Floating point exception
----------------------+-----------------------------------------------------
Reporter: dons | Owner:
Type: bug | Status: new
Priority: normal | Milestone: 6.6.1
Component: Compiler | Version: 6.6
Severity: normal | Resolution:
Keywords: | Difficulty: Unknown
Testcase: | Architecture: x86
Os: Unknown |
----------------------+-----------------------------------------------------
Comment (by simonmar):
None of the arithmetic operations on `Int` check for overflow, they all
wrap around modulo the size of the `Int` type, so it seems to me we should
be consistent and yield 0 for this case. Haskell 98 says that overflow is
implementation-defined, so it's up to us what we do.
Anyway, the place is `GHC.Real`, in the the `Integral` instance for `Int`.
Also the various other integral types in `GHC.Int` need the same
treatment.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/1042>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the Glasgow-haskell-bugs
mailing list