
#11502: Scrutinize use of 'long' in rts/ -------------------------------------+------------------------------------- Reporter: thomie | Owner: MarcelineVQ Type: task | Status: new Priority: normal | Milestone: Component: Runtime System | Version: 7.10.3 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by erikd): * cc: erikd (added) Comment: Replying to [comment:4 hvr]:
Given we're slowly moving to C99-izing the code (se e.g. db9de7eb3e91820024f673bfdb6fb8064cfed20d), it may make sense to take this opportunity to use `
`-typedefs instead, e.g. - `int64_t` instead of `StgInt64` - `uint64_t` instead of `StgWord64` - `intptr_t` instead of `StgInt` - `uintptr_t` instead of `StgWord`
I'm no actually sure that just applying this change blindly across the code base is a good idea. There are almost certainly places where `StgWord` is used as a "machine word sized unsigned value" and has no notion of pointer-ness at all. In that case. `size_t` might be a better choice. Similarly, for `StgInt`, there are probably places where `ssize_t` (the signed version of `size_t`) is a better choice. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11502#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler