[GHC] #15973: Int used to represent target integer literals

#15973: Int used to represent target integer literals -------------------------------------+------------------------------------- Reporter: bgamari | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: 8.6.3 Component: Compiler | Version: 8.6.2 Keywords: newcomer | Operating System: Unknown/Multiple Architecture: | Type of failure: None/Unknown Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- There are numerous places within GHC where we use `Int` to represent a constant literal for the target. For instance, `CmmUtils` has the following: {{{#!hs -- XXX: should really be Integer, since Int doesn't necessarily cover -- the full range of target Ints. mkIntCLit :: DynFlags -> Int -> CmmLit mkIntCLit dflags i = CmmInt (toInteger i) (wordWidth dflags) }}} This could go very wrong when cross-compiling from a 32-bit machine to a 64-bit target. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15973 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15973: Int used to represent target integer literals -------------------------------------+------------------------------------- Reporter: bgamari | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.6.2 Resolution: | Keywords: newcomer Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by chessai): Some questions: Should this be `Int64`, `Int32`, or what? How could one filter out which uses of `Int` are problematic in this way? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15973#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC