digitalmars.D.bugs - [Issue 2020] New: version(release) is missing
- d-bugmail puremagic.com Apr 20 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 digitalmars.com ReportedBy: wbaxter 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. --
Apr 20 2008








d-bugmail puremagic.com