Compiled dmd2.032 in VC++ 2009!

Jeremie Pelletier jeremiep at gmail.com
Thu Sep 3 20:09:12 PDT 2009


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.

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 no stdint.h and fenv.h headers, I found isnan() in float.h but I had to leave out backend/strtold.c for now, there was no unresolved references from this. alloca() was also found in malloc.h, not stdlib.h. The joys of not using a C99 compliant compiler heh. I also couldn't get the compiler to compile *.c as C++, even with the /TP switch (Compile as C++), I had to rename every file to *.cpp.

Other than that, it was standard compilation, I disabled a few warnings to not get my output flooded, defined MARS, __I86__ and _DH, generated the different table files, and compiled, all from within the IDE.

Jumping back in C++ reminded me why I loved D so much, I will definitely start working on, or help developing it if already planned, a D port of dmd once the spec gets stable.

In any ways, I am wondering where I can submit my changes for review, since I doubt there is any public access to the repository on dsource, and I would very much like to contribute to the D programming language.



More information about the Digitalmars-d mailing list