www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 21940] New: Compiler flags -check=on/off not recognized

https://issues.dlang.org/show_bug.cgi?id=21940

          Issue ID: 21940
           Summary: Compiler flags -check=on/off not recognized
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: moonlightsentinel disroot.org

The help page for the -check=... flag lists on/off as a convenient shortcut to
enable/disable all checks:

dmd -check=?
Enable or disable specific checks:
  =[h|help|?]           List information on all available choices
  =assert[=[on|off]]    Assertion checking
  =bounds[=[on|off]]    Array bounds checking
  =in[=[on|off]]        Generate In contracts
  =invariant[=[on|off]] Class/struct invariants
  =out[=[on|off]]       Out contracts
  =switch[=[on|off]]    Final switch failure checking
  =on                   Enable all assertion checking
                        (default for non-release builds)
  =off                  Disable all assertion checking 

But those options are not recognized:

dmd -check=on
Error: Switch `-check=on` is invalid

dmd -check=off
Error: Switch `-check=off` is invalid

--
May 20