[Issue 10147] Make -w identical to -wi and deprecate it

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Jun 30 00:11:20 PDT 2013


http://d.puremagic.com/issues/show_bug.cgi?id=10147


monarchdodra at gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |monarchdodra at gmail.com


--- Comment #11 from monarchdodra at gmail.com 2013-06-30 00:11:18 PDT ---
(In reply to comment #2)
> > Can you please be more specific, maybe with example code? I have no knowledge
> > of any of this.
> 
> Okay. Let's say that you have a function like
> 
> [...]
> 
> _Anything_ that tests whether code compiles potentially breaks thanks to -w.
> How big a problem this is in practice, I don't know, but -w can change the
> semantics of code, meaning that whether you compile with -w or not effectively
> creates two different languages. Normally, we reject any suggestions that
> involve flags like this. -w really makes no sense.

Couldn't we instead "fix" "-w" ? Currently, it transforms any warning into an
error, creating the above mentioned problem. What we *really* want (as stated
by Andrej) is simply for compilation to halt on the first reported warning.

If we simply "upgrade" -w to work as in "if a warning is *emitted*, then
translate that warning into an error, and then halt compilation.

This means we'd have 100% the same behavior between "", "-w", "-wi", but still
get the behavior of "I refuse to compile until you process this warning".

I'm not compiler savvy, so wouldn't know how easy it is to improve it to do
this, but it seems better than to simply deprecate it...

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list