[dmd-internals] Which compiler is used to compile DMD on OS X

Brad Roberts via dmd-internals dmd-internals at puremagic.com
Sat Nov 1 12:29:27 PDT 2014


The auto testers use gcc (4.2.1, I just checked all 3 machines).  I've 
never seen the entire test suite pass with clang, though it's been quite 
a while since I tried clang, maybe it's gotten better.

On 11/1/2014 4:56 AM, Jacob Carlborg via dmd-internals wrote:
> Which compiler is used to compile DMD on OS X, is it Clang or GCC? I was under the impression that it's GCC that is supposed to be used. But looks like it's Clang, because I found a test case (see below) that passes if DMD is compiled with Clang but fails when it's compiled with GCC.
>
> The reason why I'm asking is that the make file explicitly says "g++", yes I know that g++ points to Clang. I have also created a pull request that switch from g++ to clang++, but that was reverted because of some failing tests. Because of that, I've made sure that my g++ actually points to GCC and not Clang.
>
> Here is the test case, it's a test extracted from "test/runnable/interpret.d" in the DMD test suite:
>
> import std.stdio;
>
> void test113()
> {
>      import core.math;
>
>      static void compare(real a, real b)
>      {
>          writefln("compare(%30.30f, %30.30f);", a, b);
>          assert(fabs(a - b) < 128*real.epsilon);
>      }
>
>      static if(__traits(compiles, (){enum real ctval4 = yl2xp1(3.14, 1);}))
>      {
>          enum real ctval4 = yl2xp1(3.14, 1);
>          real rtval4 = yl2xp1(3.14, 1);
>          compare(ctval4, rtval4);
>      }
> }
>
> void main ()
> {
>      test113();
> }
>


More information about the dmd-internals mailing list