UNREG: fix pprHexVal to emit zeros (#10518)
ClosedPublic

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

Details

Summary

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

43f1b2ecd1960fa7377cf55a2b97c66059a701ef

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

Repository
rGHC Glasgow Haskell Compiler
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
trofi retitled this revision from to UNREG: fix pprHexVal to emit zeros (#10518).Jun 13 2015, 6:02 PM
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

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.