[dmd-internals] longdouble and splitting off typedefs in mars.h

Rainer Schuetze r.sagitario at gmx.de
Wed Jul 18 10:46:25 PDT 2012


On 18.07.2012 09:13, Iain Buclaw wrote:
> Hi,
>
> I have recently started moving across longdouble.h, and the use of
> ldouble() over into GDC's copy of the D frontend from upstream DMD.  I
> see there's an (attempted?) implementation for GDC already in
> longdouble.h
>
> https://github.com/D-Programming-Language/dmd/blob/master/src/root/longdouble.h#L16

This was just guesswork, as I could not try it out.

I wonder why the real_t implementation is necessary at all, as GCC seems 
to be capable of 80-bit floating points with "long double". At least 
that is how DMD is built on posix systems. So maybe you can also use the 
!_MSC_VER branch of the conditional.

>
> However, this does not work as GDC's real_t implementation relies on
> some typedef's in mars.h, and #include mars.h won't work as mars.h
> depends upon longdouble.h.  The only way I can see around it is to
> split off all integral and floating typedefs (perhaps not complex_t)
> from mars.h into a new header named - eg, coretypes.h.  Would it be ok
> if I perform this slight internal move about and pull it into DMD?
>
>
> Regards
>



More information about the dmd-internals mailing list