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

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu May 20 19:07:27 UTC 2021


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 at puremagic.com
          Reporter: moonlightsentinel at 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

--


More information about the Digitalmars-d-bugs mailing list