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
@MoonlightSentinel created dlang/dmd pull request #12548 "Fix 21940 - Recognize on/off as valid options for -check" fixing this issue: - Fix 21940 - Recognize on/off as valid options for -check Check for the special values `"on"` and `"off"` before parsing `<option>=<state>`. https://github.com/dlang/dmd/pull/12548
dlang/dmd pull request #12548 "Fix 21940 - Recognize on/off as valid options for -check" was merged into stable: - 7fb9accd947edf98e53093b2d37cad650e0b5828 by MoonlightSentinel: Fix 21940 - Recognize on/off as valid options for -check Check for the special values `"on"` and `"off"` before parsing `<option>=<state>`. https://github.com/dlang/dmd/pull/12548
dlang/dmd pull request #12600 "merge stable" was merged into master: - fea011ecb74ca6f9a9124980e3ec0c9c60a5f7e3 by MoonlightSentinel: Fix 21940 - Recognize on/off as valid options for -check Check for the special values `"on"` and `"off"` before parsing `<option>=<state>`. https://github.com/dlang/dmd/pull/12600