Switch case falltrhough, regression or intended behavior ?

Nick Sabalausky SeeWebsiteToContactMe at semitwist.com
Mon Feb 18 16:38:04 PST 2013


On Sun, 17 Feb 2013 22:53:13 +0100
Andrej Mitrovic <andrej.mitrovich at gmail.com> wrote:

> On 2/17/13, Jonathan M Davis <jmdavisProg at gmx.com> wrote:
> > Probably because -w turns warnings into errors. That's its whole
> > schtick.
> 
> Really? Man this is confusing..
> 

The -w is just simply the "treat warnings as errors" switch (and of
course it also implies "enable warnings").

Most compilers have an "enable warnings" switch and a "treat warnings
as errors" switch. DMD is the same, it just treats "as errors" as the
default instead of "as warnings" as the default.

That is perhaps a little backwards, but it's partly because DMD didn't
used to even *have* the "-wi" switch and the ability to treat warnings
*not* as errors. Then we talked^H^H^H^H^H^Hharrassed Walter into adding
-wi, and being such a good sport he obliged :)



More information about the Digitalmars-d mailing list