www.digitalmars.com         C & C++   DMDScript  

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

reply d-bugmail puremagic.com writes:
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 puremagic.com
        ReportedBy: jlquinn optonline.net


--- Comment #0 from Jerry Quinn <jlquinn 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: -------
Jan 18 2010
parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=3721


yebblies <yebblies gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |yebblies gmail.com
         Resolution|                            |DUPLICATE


--- Comment #1 from yebblies <yebblies gmail.com> 2011-06-12 22:11:46 PDT ---
*** This issue has been marked as a duplicate of issue 3321 ***

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