Which version of DMD does GDC 10 target

Mathias LANG geod24 at gmail.com
Thu Aug 20 06:25:45 UTC 2020


On Thursday, 20 August 2020 at 05:49:29 UTC, Arun wrote:
> On Thursday, 20 August 2020 at 05:07:28 UTC, H. S. Teoh wrote:
>> On Thu, Aug 20, 2020 at 04:28:41AM +0000, Arun via 
>> Digitalmars-d-learn wrote:
>>> Which version of DMD is GDC 10 based on?
>>
>> Compile the following D program to find out:
>>
>> -----
>> static assert(0, "Compiler language version: " ~ 
>> __VERSION__.stringof);
>> -----
>>
>> I have this line in a file called langver.d, and whenever the 
>> exact language version isn't obvious, I compile it to find out 
>> the version. :-)  (And yes it deliberately asserts instead of 
>> using pragma(msg) so that I don't have to type -o- or -of- or 
>> -c or whatever to suppress actual code emission, just 
>> `$compiler langver.d`.)
>>
>>
>> --T
>
> Nice trick. Thanks. For the benefit of others, GDC 10 is based 
> on DMD 2.076. https://dlang.org/changelog/2.076.0.html
>
> Side note, Using $() is better than `` for subshells, as it 
> makes nesting much easier. ;-)

Side note: Usually a lot of bug fixes are backported to GDC, so 
even though it says 2.076 feature-wise, bugs that have been fixed 
much later might not be present.
Which is great because it makes bootstrapping *SO MUCH* easier.


More information about the Digitalmars-d-learn mailing list