[Issue 2020] New: version(release) is missing
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun Apr 20 18:43:57 PDT 2008
http://d.puremagic.com/issues/show_bug.cgi?id=2020
Summary: version(release) is missing
Product: D
Version: 2.012
Platform: PC
OS/Version: Windows
Status: NEW
Severity: enhancement
Priority: P2
Component: DMD
AssignedTo: bugzilla at digitalmars.com
ReportedBy: wbaxter at gmail.com
There are times you may want to do something differently in a final release
version, just as the built-in D array types do.
It appears this could be added fairly simply.
In src/dmd/mars.c there's this code:
if (global.params.release)
{ global.params.useInvariants = 0;
global.params.useIn = 0;
global.params.useOut = 0;
global.params.useAssert = 0;
global.params.useArrayBounds = 0;
global.params.useSwitchError = 0;
}
I think just adding this line inside the 'if' would do the trick:
VersionCondition::addPredefinedGlobalIdent("release");
If not, it can't be much more complicated than that.
--
More information about the Digitalmars-d-bugs
mailing list