[Issue 16436] Implement pragma(switches, "")

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Sun Jun 25 09:33:44 PDT 2017


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

Vladimir Panteleev <dlang-bugzilla at thecybershadow.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |dlang-bugzilla at thecybershad
                   |                            |ow.net
         Resolution|---                         |WONTFIX

--- Comment #7 from Vladimir Panteleev <dlang-bugzilla at thecybershadow.net> ---
Giving the source code control over compiler behaviour is not desirable for the
same reason why letting programs know (at compile time) which switches are
active isn't. Many guarantees will no longer hold and debugging things reliably
becomes more difficult in general.

Furthermore, a pragma is not a good place for this. Pragmas participate in
semantics and can be emitted by CTFE.

Furthermore, compiler switches are heavily specific to the implementation. GDC
and LDC each use different sets of switches - their compatibility layer with
DMD switches comes as a stand-alone program.

Finally, this is a non-trivial change. The correct avenue for such a proposal
would be a DIP.

--


More information about the Digitalmars-d-bugs mailing list