-debug and -release

Sean Kelly sean at f4.ca
Sun May 27 11:32:48 PDT 2007


lurker wrote:
> What does it mean to compile a file with -debug and -release switches? Like so:
> 
> $ echo "void main() {}" > test.d
> $ dmd -debug -release test.d
> 
> Why the compiler accepts both and doesn't complaint?

IIRC the -release flag turns off contracts and array range checking 
while -debug enables code in debug blocks.  I think -release may turn 
off asserts as well.  I think -release is probably a bad name for that 
particular flag since control of contracts and such isn't really a 
release option.  The name is also confusing because of its application 
to other languages like C/C++.


Sean



More information about the Digitalmars-d mailing list