Compiling DMD with C++11

Andre Artus andre.artus at gmail.com
Tue Aug 6 15:10:33 PDT 2013


On Tuesday, 6 August 2013 at 16:18:54 UTC, bearophile wrote:
> Andre Artus:
>
>> 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'.
>
> I suggest to put most of those small bug reports in Bugzilla 
> (or better if you want as a patch in GitHub to fix them).
>
> Bye,
> bearophile

I 'fixed' it in my copy. By that I mean it compiles and runs on 
my system, but no code in other conditional compilation path has 
changed, so it will break say on *nix etc. I currently only work 
on Mac and Windows, my Linux & BSD boxes were stolen.

If there is agreement with the new name, or if a better 
alternative is offered then I will be more than happy to make a 
comprehensive change.

I'm not sure if it classifies as a bug though, as there is no 
reason why DMD *has* to compile with C++11 libraries; it was just 
an experiment I tried.

I'm not sure that "strtolongdouble" fits in with the naming 
convention but I decided to choose something that would be easy 
to grep if I needed to do so. The all lowercase convention 
prevalent in C causes a little bit of sick to rise in my throat 
every time I see it. When I first saw 'strtold' my brain picked 
up 'str to old', as opposed to 'str to l d'. I normally try to 
write code in a way that someone with no prior experience may 
reasonably infer it's function merely from looking at the 
signature. I'll refactor several times if need be (while 
maintaining the contract on published interfaces where need be). 
But, when climbing into an established codebase it is prudent to 
follow existing conventions; I have not yet determined what they 
are for DMD. I take it there is a doc or page up about that 
somewhere.



More information about the Digitalmars-d mailing list