On Sunday, 24 February 2013 at 17:05:57 UTC, Timon Gehr wrote:
The documentation is often wrong anyway, but here you go:

http://dlang.org/lex.html

(look for 'Special Tokens')

Hmm... it is documented as "Compiler version as an integer, such as 2001". I wouldn't except this to match the DMDFE version for anything except DMD, a priori. I observe that both GDC and LDC right now keep the same code (i.e. __VERSION__ does match the DMDFE version on those compilers) but, say, SDC has a version of 0. Frankly I'd except LDC to have a __VERSION__ of 0010 (or however they want to encode that) instead of 2060.

Well, whatever... it is good enough for now. I'll isolate the version checking code and hope that GDC/LDC developers don't change the __VERSION__ code.

I'm still up to implementing this if somebody with commit rights sees the hackiness of this.

Reply via email to