I'm not sure if this is a spec bug, a compiler bug, or both.
debug static assert(0);
dmd -debug gives error as expected
dmd -debug=0 gives no error as expected
dmd -debug=2 gives error NOT expected
dmd -debug=me gives no error (as expected?)
The spec says that -debug enables this. Actually, should the spec be saying anything about a compiler flag??
One argument is that debug with no condition should be enabled by any debug level no matter what. Then there's no need to mention a -debug flag in the spec.
debug (0) static assert(0);
dmd -debug=0 gives error as expected
dmd -debug gives error NOT expected
dmd -debug=me gives error NOT expected
Again, it's debatable what should happen with -debug. But -debug=me should definitely not give an error here according to the spec.
Comment #1 by yebblies — 2011-06-12T22:11:46Z
*** This issue has been marked as a duplicate of issue 3321 ***