Bug 10330 – Regression (2.063.2): __VERSION__ is set wrong

Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-06-11T05:31:00Z
Last change time
2015-06-09T05:10:38Z
Assigned to
nobody
Creator
andrej.mitrovich

Comments

Comment #0 by andrej.mitrovich — 2013-06-11T05:31:44Z
module test; void main() { pragma(msg, __VERSION__); } 2.063: $ dmd test.d > 2063L 2.063.2: $ dmd test.d > 63002L
Comment #1 by andrej.mitrovich — 2013-06-11T05:34:46Z
Copied from NG: Note that some of us have used __VERSION__ to enable compiler-specific compilation, e.g.: static assert(__VERSION__ >= 2.063, "This library can only compile with D 2.063 or newer"); Or: static if (__VERSION__ < 2.063) { /* implement some compiler/library workaround here */ } else { /* use regular code or regular import here */ } Unfortunately __VERSION__ was never built to be used with these ".point" releases, so maybe we should simply let __VERSION__ always be 2063 for all 2.063 point releases.
Comment #2 by bugzilla — 2013-06-11T13:42:48Z
Comment #3 by github-bugzilla — 2013-06-11T13:46:39Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/01bd0c2e1c9ed05ad754bac0afc05f6a38cdf82c fix Issue 10330 - Regression (2.063.2): __VERSION__ is set wrong https://github.com/D-Programming-Language/dmd/commit/19a54f8d3c65eb017aba3c7ef3a15f9629fe0e72 Merge pull request #2162 from WalterBright/fix10330 fix Issue 10330 - Regression (2.063.2): __VERSION__ is set wrong
Comment #4 by github-bugzilla — 2013-06-11T14:06:45Z
Commit pushed to 2.063 at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/b0240e505ea2be6dbbe20129c234a9302f25cb07 Merge pull request #2162 from WalterBright/fix10330 fix Issue 10330 - Regression (2.063.2): __VERSION__ is set wrong
Comment #5 by github-bugzilla — 2013-06-11T14:08:29Z
Commit pushed to dmd-1.x at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/f0efaeafd95e33ee2c5fbfb67a9ae01ab82e436b Merge pull request #2162 from WalterBright/fix10330 fix Issue 10330 - Regression (2.063.2): __VERSION__ is set wrong