Categorization of warnings

Jack Stouffer via Digitalmars-d digitalmars-d at puremagic.com
Mon Mar 28 09:47:53 PDT 2016


On Monday, 28 March 2016 at 16:21:15 UTC, Johan Engelen wrote:
> I just submitted a PR [1] that catagorizes warnings, such that 
> you can do something like this:
> dmd -w -Wno-not-reachable
> which would error on any warning except the "statement not 
> reachable" warnings (it completely disables that warning).
>
> The motivation for the selective disabling/enabling of warnings 
> was a recent discussion in the Learn forum [2].
>
> Please read about it in detail in the first message of the PR 
> [1].
>
> - Johan
>
> [1]  https://github.com/D-Programming-Language/dmd/pull/5592
> [2]  
> http://forum.dlang.org/thread/baupegcfvumouhgauetk@forum.dlang.org

I think warnings being part of the compiler is a mistake. I don't 
think they will ever be removed, so I think this is a good 
compromise.

The only reason compilers have warnings in them is because C++ 
needs an entire compiler to warn you about potential problems, 
and it has since become tradition for that feature to be 
included. We can just as easily rely on dscanner for this kind of 
thing and simplify the compiler.


More information about the Digitalmars-d mailing list