Implement -Wunrecognised-warning-flag
ClosedPublic

Authored by bgamari on Jan 23 2016, 2:24 PM.

Details

Summary

This allows the user to avoid warnings for warning flags that GHC
doesn't recognise. See Trac #11429 for details..

Test Plan

Validate with T11429[abc] tests

Diff Detail

Repository
rGHC Glasgow Haskell Compiler
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
bgamari retitled this revision from to Implement -Wunrecognised-warning-flag.Jan 23 2016, 2:24 PM
bgamari updated this object.
bgamari edited the test plan for this revision. (Show Details)
bgamari added reviewers: hvr, austin.
bgamari updated the Trac tickets for this revision.
hvr added a comment.Jan 23 2016, 2:27 PM

I assume the order is relevant? I.e. what happens for -Wfoobar -Wno-unrecognised-warning-flag ?

In D1830#53899, @hvr wrote:

I assume the order is relevant? I.e. what happens for -Wfoobar -Wno-unrecognised-warning-flag ?

Yes, as I note in Trac #11429 the order is relevant. However, this is consistent with other GHC flags; see Trac #10560.

hvr requested changes to this revision.Jan 24 2016, 8:04 AM
hvr added inline comments.
docs/users_guide/using-warnings.rst
117

In my not so humble opinion, this is the completely wrong default here!

That way you wouldn't even notice if -Wunrecognized-warning-flags was misspelled, and effectively ... While it's highly desirable we're finally allowing to tolerate unknown warnings, but being totally silent about unknown warnings *by default* is silly, IMO. ;-)

This revision now requires changes to proceed.Jan 24 2016, 8:04 AM
bgamari added inline comments.Jan 24 2016, 11:24 AM
docs/users_guide/using-warnings.rst
117

Ahh, fair enough. Yes, I misread the proposal in Trac #11429. Indeed, it would make more sense for this to be enabled by default.

bgamari updated this revision to Diff 6421.Jan 25 2016, 8:50 AM
  • Fix documented default
  • Make option name plural
hvr accepted this revision.Jan 25 2016, 9:54 AM
hvr added inline comments.
compiler/main/DynFlags.hs
600

thumbsup

This revision is now accepted and ready to land.Jan 25 2016, 9:54 AM
This revision was automatically updated to reflect the committed changes.