www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 21782] New: Add version variants for all cmd-line option checks


          Issue ID: 21782
           Summary: Add version variants for all cmd-line option checks
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: qs.il.paperinik gmail.com

Using DMD command-line options,[1] one can (en/dis)able certain checks. Using a
version statement, one can conditionally compile code depending on *some* of
these options.

D should provide a version identifier (or keyword) for *every* check. That
identifier or keyword is exactly what it is in [1], and additionally, for every
version identifier/keyword stated, another equivalent identifier should be
available that starts with "check", in particular, I propose the following
names: checkAsserts, checkBounds, checkInContracts, checkInvariants,
checkOutContracts, checkFinalSwitch.

[1] https://dlang.org/dmd-windows.html#switch-check

Mar 29 2021