I decided to see whether dmd would compile with VS2013 and Clang. So far the only issue seems to be that C++11 RTL already defines 'strtold'.

http://www.cplusplus.com/reference/cstdlib/strtold/

Compiling results in the following error:

Error 1 error C2556: 'longdouble strtold(const char *,char **)' : overloaded function differs only by return type from 'long double strtold(const char *,char **)' d:\source\github\d\dmd\src\root\longdouble.h 201 1 dmd_msc

I have not used C++ in a very long time (cannot believe I used to love it, now it looks so ugly).

I can build against the VS2012 libraries, but that defeats the purpose of the exercise for me.

Is there a way to hide cstdlib/strtold?

I could refactor the code to rename dmd/strtold, but that may not go down well (play nice with others).

I also get the following warnings (when compiling in VS2012):

Warning 1 warning C4805: '!=' : unsafe mix of type 'char' and type 'bool' in operation D:\source\GitHub\D\dmd\src\mars.c 1031 1 dmd_msc (Visual Studio 2012)

Warning 2 warning C4700: uninitialized local variable 'i' used d:\source\github\d\dmd\src\backend\cgcod.c 2204 1 dmd_msc (Visual Studio 2012)

Warning 3 warning C4805: '==' : unsafe mix of type 'bool' and type 'int' in operation D:\source\GitHub\D\dmd\src\backend\divcoeff.c 284 1 dmd_msc (Visual Studio 2012)

I tend to treat warnings as errors in my own code, which I relaxed here in order to get a working build.

Reply via email to