#1861: Uncompilable code generated
----------------------+-----------------------------------------------------
Reporter: guest | Owner: simonmar
Type: bug | Status: new
Priority: normal | Milestone: 6.8.3
Component: Compiler | Version: 6.9
Severity: normal | Resolution:
Keywords: | Difficulty: Unknown
Testcase: | Architecture: x86
Os: MacOS X |
----------------------+-----------------------------------------------------
Changes (by simonpj):
* owner: => simonmar
Comment:
The problem is located at line 398 of `codeGen/PprC.hs`, which prints
float/double constants in a form the C compiler understands.
Two alternatives
* Do what native code gen does: generate a hex constant and cast. Perhaps
non-portable.
* Do conditional tests to check for infinite values and `INFINITY`. Also
minus-infinite and NaN need checked. In effect, this means moving the
`fromRational` call in `Outputable.rational` into `PprC`.
Simon M recommends the second for now. And will do!
Thanks
Simon
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/1861#comment:9>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs