[GHC] #3353: Add CLDouble support

GHC cvs-ghc at haskell.org
Thu Apr 29 21:34:16 EDT 2010


#3353: Add CLDouble support
---------------------------------+------------------------------------------
    Reporter:  igloo             |        Owner:              
        Type:  bug               |       Status:  new         
    Priority:  normal            |    Milestone:  _|_         
   Component:  Compiler          |      Version:  6.12.1      
    Keywords:                    |   Difficulty:  Unknown     
          Os:  Unknown/Multiple  |     Testcase:              
Architecture:  Unknown/Multiple  |      Failure:  None/Unknown
---------------------------------+------------------------------------------

Comment(by ksf):

 Replying to [comment:7 igloo]:
 > `CLDouble` needs to be the same as the C `long double` type, so things
 don't go wrong when using the FFI with long doubles.

 But there's no reliable agreement between compilers or even compiler
 switches on what a long double is. [http://msdn.microsoft.com/en-
 us/library/cc953fe1.aspx VS 2010] interprets it as double (96/80 bits),
 whereas gcc on the same will generate code for 96 bit floats on 386 and
 128 bits of precision for amd64 (you can switch behaviour with
 [http://gcc.gnu.org/onlinedocs/gcc/i386-and-x86_002d64-Options.html
 -m128bit-long-double]).


 Implementing quad precision support doesn't fix the problem of not being
 able to know what a long double is without knowing the way the code to be
 interfaced to was compiled, whereas not providing an alias to CDouble
 breaks now working stuff for no reason at all.

 Proper CLDouble support would either involve switches to select the proper
 interpretation of "long double" and explicit types for every supported bit
 width to interface to mixed code.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/3353#comment:9>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the Glasgow-haskell-bugs mailing list