[Issue 3721] New: -debug flag doesn't behave as in spec

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Jan 18 20:16:37 PST 2010


http://d.puremagic.com/issues/show_bug.cgi?id=3721

           Summary: -debug flag doesn't behave as in spec
           Product: D
           Version: 2.038
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: jlquinn at optonline.net


--- Comment #0 from Jerry Quinn <jlquinn at optonline.net> 2010-01-18 20:16:36 PST ---
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.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list