Bug 3721 – -debug flag doesn't behave as in spec

Status
RESOLVED
Resolution
DUPLICATE
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
Other
OS
Linux
Creation time
2010-01-18T20:16:00Z
Last change time
2015-06-09T01:27:14Z
Assigned to
nobody
Creator
jlquinn

Comments

Comment #0 by jlquinn — 2010-01-18T20:16:36Z
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 ***