Categorization of warnings

Dicebot via Digitalmars-d digitalmars-d at puremagic.com
Mon Mar 28 21:35:11 PDT 2016


On 03/28/2016 07:21 PM, 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

Sadly, this isn't very useful. If there is one legitimate use of code
warned about one wants to disable that specific place and not all
warning of that kind in whole program. Which means it has to be
controlled by some sort of pragma.



More information about the Digitalmars-d mailing list