GDC release 0.23

Anders F Björklund afb at algonet.se
Wed Mar 7 07:53:57 PST 2007


Sean Kelly wrote:

>>> Yeah that doesn't sound like a very attractive option.  Some of the 
>>> later replies in the Darwin thread mention a compiler switch:
>>>
>>> http://lists.apple.com/archives/Darwin-development/2001/Jan/msg00471.html 
>>>
>>> Is that a possibility?  Or did that switch not make it into an actual 
>>> release?
>>
>> There are two switches: -mlong-double-64 and -mlong-double-128,
>> just that the second one ("double-double") is now the default...
> 
> Oh I see.  That thread above suggested the opposite.  Could GDC simply 
> key the size of real off this switch as well then?  If the point is for 
> real to map to double-double, then it must be aware of it, correct?  I 
> know it's not ideal to have the size of any variable change dynamically, 
> but this seems like a case where doing so may actually be desirable.

The thread was old, things change. Especially: from GCC 3.3 to GCC 4.0
http://developer.apple.com/releasenotes/DeveloperTools/RN-GCC4/index.html

"In previous releases of GCC, the long double type was just a synonym 
for double. GCC 4.0 now supports true long double. In GCC 4.0 long 
double is made up of two double parts, arranged so that the number of 
bits of precision is approximately twice that of double."

(this was for Apple GCC, but Linux PPC went through a similar change)


Older versions of PPC operating systems used 64-bit for "long double",
newer versions use 128-bit. Both are still in use, so we won't know.

And since the D "real" type simply maps over to C/C++ "long double",
it means that it will be either 64-bit, 80-bit or 128-bit. Varying.

--anders



More information about the Digitalmars-d-announce mailing list