-debug and -release
Tomas Lindquist Olsen
tomas at famolsen.dk
Wed May 30 06:22:52 PDT 2007
Regan Heath wrote:
> Don Clugston Wrote:
>> I only just discovered that assert(0) is _not_ disabled by -release. I
>> didn't find that mentioned in the documentation.
>
> Perhaps we want a table of things with the various compile flags which
> enable/disable them in the docs. Similar to the comparison table for
> structs, classes, etc.
>
> Regan Heath
Until that happens, you can look inside the 'dmd/mars.c' file of the dmd
frontend source code. The options parsing happens here and it's fairly easy
to follow. For example the -release flag does this:
... snip ...
else if (strcmp(p + 1, "release") == 0)
global.params.release = 1;
... snip ...
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;
}
More information about the Digitalmars-d
mailing list