[GHC] #10752: Print which warning-flag controls/enabled an emitted warning
#10752: Print which warning-flag controls/enabled an emitted warning -------------------------------------+------------------------------------- Reporter: hvr | Owner: Type: feature | Status: new request | Priority: normal | Milestone: 7.12.1 Component: Compiler | Version: 7.10.2 Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: None/Unknown Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Revisions: | -------------------------------------+------------------------------------- Both `gcc` and `clang` tell which warning flag a reported warning can be controlled with, e.g. {{{ $ clang-3.5 -Wall -c hello.c hello.c:3:7: warning: unused variable 'x' [-Wunused-variable] int x; ^ 1 warning generated. }}} {{{ $ gcc -Wall -c hello.c hello.c: In function ‘main’: hello.c:3:7: warning: unused variable ‘x’ [-Wunused-variable] int x; ^ hello.c:4:1: warning: control reaches end of non-void function [-Wreturn- type] } ^ }}} With GHC however, we need to lookup the documentation (or memorise all warning flags) to find out which `-fno-warn-*` flag we need to use to silence a specific warning. I propose we augment GHC's warnings in a similar style to how `gcc`/`clang` report flags in compile warnings. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10752> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#10752: Print which warning-flag controls/enabled an emitted warning -------------------------------------+------------------------------------- Reporter: hvr | Owner: Type: feature request | Status: new Priority: normal | Milestone: 8.0.1 Component: Compiler | Version: 7.10.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Revisions: -------------------------------------+------------------------------------- Changes (by osa1): * cc: osa1 (added) -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10752#comment:2> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#10752: Print which warning-flag controls/enabled an emitted warning -------------------------------------+------------------------------------- Reporter: hvr | Owner: Type: feature request | Status: new Priority: normal | Milestone: 8.0.1 Component: Compiler | Version: 7.10.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Revisions: -------------------------------------+------------------------------------- Comment (by osa1): This is a great idea and it should be just a straightforward refactoring: - Modify `ErrUtils.makeIntoWarning` to get a `Maybe WarningFlag` as argument. - Modify `ErrUtils.ErrMsg` to record a `WarningFlag`. - Since we want to show flags uniformly in messages, maybe modify `LogAction` to pass this `Maybe WarningFlag`. Then modify `DynFlags.defaultLogAction` to print these flags. - Fix all the compile errors by passing warning flags to `makeIntoWarning`. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10752#comment:3> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#10752: Print which warning-flag controls/enabled an emitted warning -------------------------------------+------------------------------------- Reporter: hvr | Owner: Type: feature request | Status: new Priority: normal | Milestone: 8.0.1 Component: Compiler | Version: 7.10.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Revisions: -------------------------------------+------------------------------------- Comment (by goldfire): +1 from me. I look these up with some frequency. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10752#comment:4> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#10752: Print which warning-flag controls/enabled an emitted warning -------------------------------------+------------------------------------- Reporter: hvr | Owner: quchen Type: feature request | Status: new Priority: normal | Milestone: 8.2.1 Component: Compiler | Version: Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by hvr): * owner: => quchen * version: 7.10.2 => * milestone: 8.0.1 => 8.2.1 -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10752#comment:5> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#10752: Print which warning-flag controls/enabled an emitted warning -------------------------------------+------------------------------------- Reporter: hvr | Owner: quchen Type: feature request | Status: new Priority: normal | Milestone: 8.2.1 Component: Compiler | Version: Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: Design/Warnings | -------------------------------------+------------------------------------- Changes (by hvr): * wikipage: => Design/Warnings -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10752#comment:6> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#10752: Print which warning-flag controls/enabled an emitted warning -------------------------------------+------------------------------------- Reporter: hvr | Owner: quchen Type: feature request | Status: new Priority: normal | Milestone: 8.2.1 Component: Compiler | Version: Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: Design/Warnings | -------------------------------------+------------------------------------- Comment (by asr): +1 -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10752#comment:7> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#10752: Print which warning-flag controls/enabled an emitted warning -------------------------------------+------------------------------------- Reporter: hvr | Owner: quchen Type: feature request | Status: new Priority: normal | Milestone: 8.2.1 Component: Compiler | Version: Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: Design/Warnings | -------------------------------------+------------------------------------- Changes (by asr): * cc: asr (added) -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10752#comment:8> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#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): Wiki Page: Design/Warnings | -------------------------------------+------------------------------------- Changes (by barrucadu): * owner: quchen => barrucadu -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10752#comment:10> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#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:D1934 Wiki Page: Design/Warnings | -------------------------------------+------------------------------------- Changes (by barrucadu): * differential: => Phab:D1934 -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10752#comment:11> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#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:D1934 Wiki Page: Design/Warnings | -------------------------------------+------------------------------------- @@ -30,0 +30,23 @@ + + ----- + + As an obvious extension, (which maybe should be controlled by some `-f` + flag, e.g. `-f(no-)show-warning-groups`), GHC could then also show by + which warning-group a given warning is implied, e.g. + + + {{{ + WCompatWarningsOn.hs:16:1: warning: [-Wsemigroup (in -Wcompat)] + Local definition of ‘<>’ clashes with a future Prelude name. + This will become an error in a future release. + + WCompatWarningsOn.hs:22:3: warning: [-Wnoncanonical-monoid-instances (in + -Wcompat)] + Noncanonical ‘(<>) = mappend’ definition detected + in the instance declaration for ‘Semi.Semigroup S’. + Move definition from ‘mappend’ to ‘(<>)’ + }}} + + For the warning-sets which form a superset chain (Weverything > Wextra > + Wall > Wdefault) we'd only mention the smallest one (and omit the trivial + `-Weverything` set altogether) to keep the output concise. New description: Both `gcc` and `clang` tell which warning flag a reported warning can be controlled with, e.g. {{{ $ clang-3.5 -Wall -c hello.c hello.c:3:7: warning: unused variable 'x' [-Wunused-variable] int x; ^ 1 warning generated. }}} {{{ $ gcc -Wall -c hello.c hello.c: In function ‘main’: hello.c:3:7: warning: unused variable ‘x’ [-Wunused-variable] int x; ^ hello.c:4:1: warning: control reaches end of non-void function [-Wreturn- type] } ^ }}} With GHC however, we need to lookup the documentation (or memorise all warning flags) to find out which `-fno-warn-*` flag we need to use to silence a specific warning. I propose we augment GHC's warnings in a similar style to how `gcc`/`clang` report flags in compile warnings. ----- As an obvious extension, (which maybe should be controlled by some `-f` flag, e.g. `-f(no-)show-warning-groups`), GHC could then also show by which warning-group a given warning is implied, e.g. {{{ WCompatWarningsOn.hs:16:1: warning: [-Wsemigroup (in -Wcompat)] Local definition of ‘<>’ clashes with a future Prelude name. This will become an error in a future release. WCompatWarningsOn.hs:22:3: warning: [-Wnoncanonical-monoid-instances (in -Wcompat)] Noncanonical ‘(<>) = mappend’ definition detected in the instance declaration for ‘Semi.Semigroup S’. Move definition from ‘mappend’ to ‘(<>)’ }}} For the warning-sets which form a superset chain (Weverything > Wextra > Wall > Wdefault) we'd only mention the smallest one (and omit the trivial `-Weverything` set altogether) to keep the output concise. -- Comment (by hvr): @barrucadu This looks very promising... but have you talked to David (`quchen`) before you took the ticket from him? He had already started working on a warning refactoring in his Github repo afaik (see .e.g. https://github.com/quchen/ghc/commits/warn-refactoring)... PS: I've extended the ticket description with a bonus task -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10752#comment:12> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#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:D1934 Wiki Page: Design/Warnings | -------------------------------------+------------------------------------- Comment (by barrucadu): I had not, no. I assumed that since nothing had been updated here in a few months nobody was actively working on this. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10752#comment:13> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#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 | -------------------------------------+------------------------------------- Changes (by barrucadu): * differential: Phab:D1934 => Phab:D1943 -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10752#comment:14> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#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
#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:"b9c697eefd34fcba3ab9c1f831baf7f651ad7503/ghc" b9c697ee/ghc]: {{{ #!CommitTicketReference repository="ghc" revision="b9c697eefd34fcba3ab9c1f831baf7f651ad7503" Print which flag controls emitted desugaring warnings This is extends bb5afd3c274011c5ea302210b4c290ec1f83209c to cover warnings emitted during the desugaring phase. This implements another part of #10752 Reviewed-by: quchen, bgamari Differential Revision: https://phabricator.haskell.org/D1954 }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10752#comment:16> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#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:"869d9c62d8329022f9f5504a92d2d74efec4f2e8/ghc" 869d9c62/ghc]: {{{ #!CommitTicketReference repository="ghc" revision="869d9c62d8329022f9f5504a92d2d74efec4f2e8" Print which flag controls emitted lexer warnings This is extends bb5afd3c274011c5ea302210b4c290ec1f83209c to cover warnings emitted during lexing. This implements another part of #10752 }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10752#comment:17> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#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:"82f200b74ac1ea8c5593e2909c0033eb251eeaf2/ghc" 82f200b/ghc]: {{{ #!CommitTicketReference repository="ghc" revision="82f200b74ac1ea8c5593e2909c0033eb251eeaf2" Annotate `[-Wredundant-constraints]` in warnings (re #10752) This was missed in bb5afd3c274011c5ea302210b4c290ec1f83209c }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10752#comment:18> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#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:"b6c61e372a1a783b32f1bbd1ceb446e89478a138/ghc" b6c61e37/ghc]: {{{ #!CommitTicketReference repository="ghc" revision="b6c61e372a1a783b32f1bbd1ceb446e89478a138" Print which flag controls emitted SafeHaskell warnings This is extends bb5afd3c274011c5ea302210b4c290ec1f83209c to cover SafeHaskell warnings. This implements yet another part of #10752 }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10752#comment:19> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#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:"3cd4c9ca4564982cf159f11f59d434235ba28808/ghc" 3cd4c9ca/ghc]: {{{ #!CommitTicketReference repository="ghc" revision="3cd4c9ca4564982cf159f11f59d434235ba28808" Annotate `[-Wdeferred-type-errors]` in warnings (re #10752) This was missed in bb5afd3c274011c5ea302210b4c290ec1f83209c }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10752#comment:20> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#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:"46f3775c683faeb710c9dc22f360f39334947d73/ghc" 46f3775c/ghc]: {{{ #!CommitTicketReference repository="ghc" revision="46f3775c683faeb710c9dc22f360f39334947d73" Default to -fno-show-warning-groups (re #10752) As `-fno-show-warning-groups` shows associated warning groups regardless of whether the respective warning group flag as been passed on the CLI, the warning-group information may be confusing to users. At this point, `-fshow-warning-groups` is useful mostly to GHC developers and possibly GHC users who want to see which warning groups an emitted warning is part of. (Btw, this is particularly interesting in combination with `-Weverything` which enables *every* warning flag known to GHC.) Consequently, starting with this commit, one has to opt-in via `-fshow-warning-groups` for GHC to show warning groups. In order to reduce the testsuite delta in this commit, the `-fshow-warning-groups` flag has been added to TEST_HC_OPTS. }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10752#comment:21> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#10752: Print which warning-flag controls/enabled an emitted warning -------------------------------------+------------------------------------- Reporter: hvr | Owner: barrucadu Type: feature request | Status: closed Priority: normal | Milestone: 8.0.1 Component: Compiler | Version: Resolution: fixed | 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 | -------------------------------------+------------------------------------- Changes (by hvr): * status: new => closed * resolution: => fixed * milestone: 8.2.1 => 8.0.1 Comment: Let's call it a day and declare this ticket's scope done... at least I didn't notice any other warning-flags not being annotated in warnings (but there could still be!). There'll likely be follow-up tickets for evolving this feature in the future. ----- Merged to ghc-8.0 via - 975353bfdfab375cb5c47dc2460792190abac277 - 966cc28ffe1707685cb908753bb6f8fb78fc86c9 - 2ffd9b167a107a82fff42adb22d15b185d8b8757 - 94b2681507db793359b101b945c710e504971556 - 02e91accf082967cd28ad0d081f774117ee3386b - 209143945233726a8cf5c4eb2605a4f8084e5fa0 - 4f5b7ad8fe567bc520e5c1b185beadda9007afea -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10752#comment:22> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#10752: Print which warning-flag controls/enabled an emitted warning -------------------------------------+------------------------------------- Reporter: hvr | Owner: barrucadu Type: feature request | Status: closed Priority: normal | Milestone: 8.0.1 Component: Compiler | Version: Resolution: fixed | 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 Thomas Miedema <thomasmiedema@…>): In [changeset:"f8a5dd05ed50fe46eb86f30dc12f4c341b980e61/ghc" f8a5dd05/ghc]: {{{ #!CommitTicketReference repository="ghc" revision="f8a5dd05ed50fe46eb86f30dc12f4c341b980e61" Only add -fshow-warning-groups for ghc >= 7.11 (#10752) }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10752#comment:23> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#10752: Print which warning-flag controls/enabled an emitted warning -------------------------------------+------------------------------------- Reporter: hvr | Owner: barrucadu Type: feature request | Status: merge Priority: normal | Milestone: 8.0.1 Component: Compiler | Version: Resolution: fixed | 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 | -------------------------------------+------------------------------------- Changes (by bgamari): * status: closed => merge Comment: This introduced a small bug which is fixed by Phab:D2077. This will need merging. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10752#comment:24> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#10752: Print which warning-flag controls/enabled an emitted warning -------------------------------------+------------------------------------- Reporter: hvr | Owner: barrucadu Type: feature request | Status: merge Priority: normal | Milestone: 8.0.1 Component: Compiler | Version: Resolution: fixed | 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 Ben Gamari <ben@…>): In [changeset:"1e6ec1249b4da88fec9024598c2183e6fc0e96cd/ghc" 1e6ec12/ghc]: {{{ #!CommitTicketReference repository="ghc" revision="1e6ec1249b4da88fec9024598c2183e6fc0e96cd" Fix misattribution of `-Wunused-local-binds` warnings This fixes a bug where warnings actually controlled by - `Opt_WarnUnusedMatches` - `Opt_WarnUnusedTypePatterns` - `Opt_WarnUnusedTopBinds` were incorrectly reported as being controlled by `Opt_WarnUnusedLocalBinds` as well This bug was introduced in bb5afd3c274011c5ea302210b4c290ec1f83209c while implementing #10752 Test Plan: ./validate still running -- testsuite output wiggles expected Reviewers: barrucadu, quchen, austin, bgamari Reviewed By: bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2077 }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10752#comment:25> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#10752: Print which warning-flag controls/enabled an emitted warning -------------------------------------+------------------------------------- Reporter: hvr | Owner: barrucadu Type: feature request | Status: closed Priority: normal | Milestone: 8.0.1 Component: Compiler | Version: Resolution: fixed | 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 | -------------------------------------+------------------------------------- Changes (by bgamari): * status: merge => closed Comment: Merged as 8e672317ddcad936f2dc3c0497499cb50207954e. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10752#comment:26> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
participants (1)
-
GHC