#10752: Print which warning-flag controls/enabled an emitted warning -------------------------------------+------------------------------------- Reporter: hvr | Owner: barrucadu Type: feature request | Status: new Priority: normal | Milestone: 8.2.1 Component: Compiler | Version: Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Incorrect | Unknown/Multiple warning at compile-time | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D1943 Wiki Page: Design/Warnings | -------------------------------------+------------------------------------- Comment (by Herbert Valerio Riedel <hvr@…>): In [changeset:"bb5afd3c274011c5ea302210b4c290ec1f83209c/ghc" bb5afd3/ghc]: {{{ #!CommitTicketReference repository="ghc" revision="bb5afd3c274011c5ea302210b4c290ec1f83209c" Print which warning-flag controls an emitted warning Both gcc and clang tell which warning flag a reported warning can be controlled with, this patch makes ghc do the same. More generally, this allows for annotated compiler output, where an optional annotation is displayed in brackets after the severity. This also adds a new flag `-f(no-)show-warning-groups` to control whether to show which warning-group (such as `-Wall` or `-Wcompat`) a warning belongs to. This flag is on by default. This implements #10752 Reviewed By: quchen, bgamari, hvr Differential Revision: https://phabricator.haskell.org/D1943 }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10752#comment:15> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler