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

Jacob Carlborg via dmd-internals dmd-internals at puremagic.com
Sun Nov 2 01:57:44 PST 2014


Hmm, that's really odd. Because the I can't get the whole test suite to pass with GCC, only with Clang.

I'm having:

GCC: 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.11.00)
Clang: Apple LLVM version 6.0 (clang-600.0.54) (based on LLVM 3.5svn)

On 1 nov 2014, at 20:29, Brad Roberts via dmd-internals <dmd-internals at puremagic.com> wrote:

> 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();
>> }
>> 
> _______________________________________________
> dmd-internals mailing list
> dmd-internals at puremagic.com
> http://lists.puremagic.com/mailman/listinfo/dmd-internals

-- 
/Jacob Carlborg




More information about the dmd-internals mailing list