UNREG: fix pprHexVal to emit zeros (#10518)

Authored by trofi on Jun 13 2015, 6:02 PM.



jakzale on GHC reported a build failure
when ported GHC on a new target.

The code 'pprHexVal (2^32) W32' emits '0xU'
which is invalid C.

I've introduced bug in


when added literal truncation. That truncation
is a new source of zeros.

Signed-off-by: Sergei Trofimovich <siarheit@google.com>

Test Plan

added test and tested on UNREG ghc

Diff Detail

rGHC Glasgow Haskell Compiler
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.
trofi updated this revision to Diff 3236.Jun 13 2015, 6:02 PM
trofi retitled this revision from to UNREG: fix pprHexVal to emit zeros (#10518).
trofi updated this object.
trofi edited the test plan for this revision. (Show Details)
trofi updated the Trac tickets for this revision.
austin accepted this revision.Jun 14 2015, 8:48 AM
austin edited edge metadata.

LGTM. Yay tests.

This revision is now accepted and ready to land.Jun 14 2015, 8:48 AM
This revision was automatically updated to reflect the committed changes.