Walter Bright wrote:
Jeremie Pelletier wrote:
Well I've decided to get a look at the dmd2 source and see what I can
contribute to it, only to notice it is very VC++ unfriendly. After a
few hours of work, I finally got it to compile, and it works great,
for the most part.
Can you send me the diffs?
VC++ has no real support for long double; it supports the syntax as
distinct types but they are implemented as double precision, not
extended precision.
There are two routes to go here, one is to just make a D that uses only
double precision for real precision, the other is to write a simple
emulator for 80 bit reals so the compiler can still generate 80 bit real
code despite the shortcomings in VC++.
Actually I think that even DMD should be using a 128-bit emulator for
internal constants, regardless of the machine precision. That's a way
off, still, but I think emulator is the way to go, long-term. Likewise,
the compiler should not depend on NaNs being handled correctly in the
C++ compiler.