The flag `Werror=unrecognised-warning-flags` does not turn unrecognised warnings on fatal errors
By running on GHC 9.2.3
ghc -Werror -Wunrecognised-warning-flags -Wfoo Main.hs
I got a compilation error as expected due to the unrecognised warning Wfoo
. However, by running
ghc -Werror=unrecognised-warning-flags -Werror=foo Main.hs
I only got a warning instead of a compilation error.
- Show closed items
Activity
-
Newest first Oldest first
-
Show all activity Show comments only Show history only
- ghc-triage-bot added needs triage label
added needs triage label
- Andrés Sicard-Ramírez changed title from The flag
Werror=unrecognised-warning-flags
does not turn unrecognised warnings on a fatal errors to The flagWerror=unrecognised-warning-flags
does not turn unrecognised warnings on fatal errorschanged title from The flag
Werror=unrecognised-warning-flags
does not turn unrecognised warnings on a fatal errors to The flagWerror=unrecognised-warning-flags
does not turn unrecognised warnings on fatal errors - Andrés Sicard-Ramírez changed the description
Compare with previous version changed the description
- Developer
What about
ghc -Werror=unrecognised-warning-flags -Wfoo Main.hs
then also not fatal
on the commandline: warning: unrecognised warning flag: -Wfoo [1 of 1] Compiling Main ( Main.hs, Main.o ) Linking Main ...
Collapse replies - Author
Yep. The behaviour of
ghc -Werror=unrecognised-warning-flags -Wfoo Main.hs
describes the issue better.
- Matthew Pickering assigned to @mpickering
assigned to @mpickering
- Developer
I tried with HEAD again today and I get the correct error:
[matt@nixos:~/ghc-vanessa]$ _build/stage1/bin/ghc -Werror=unrecognised-warning-flags -Wfoo Main.hs on the commandline: error: [-Wunrecognised-warning-flags, -Werror=unrecognised-warning-flags] unrecognised warning flag: -Wfoo
Also works fine with 9.4.1 but fails with 9.2.2.
- Matthew Pickering mentioned in commit 4fc2dac0
mentioned in commit 4fc2dac0
- Matthew Pickering mentioned in commit 6b952e32
mentioned in commit 6b952e32
- Matthew Pickering mentioned in commit 2810e751
mentioned in commit 2810e751
- Matthew Pickering mentioned in commit 69e6e7a2
mentioned in commit 69e6e7a2
- Matthew Pickering mentioned in merge request !8420 (closed)
mentioned in merge request !8420 (closed)
- Matthew Pickering added Pnormal Tbug driver error messages labels and removed needs triage label
added Pnormal Tbug driver error messages labels and removed needs triage label
- Matthew Pickering changed milestone to %9.2.4
changed milestone to %9.2.4
- Matthew Pickering mentioned in commit f1d5aaa8
mentioned in commit f1d5aaa8
- Matthew Pickering mentioned in commit 6a7f8e4c
mentioned in commit 6a7f8e4c
- Matthew Pickering mentioned in commit 8b3197ee
mentioned in commit 8b3197ee
- Matthew Pickering mentioned in commit cbd13e2c
mentioned in commit cbd13e2c
- Matthew Pickering mentioned in commit 08999f97
mentioned in commit 08999f97
- Matthew Pickering mentioned in commit bbdc667e
mentioned in commit bbdc667e
- Matthew Pickering mentioned in commit 0b82ea3e
mentioned in commit 0b82ea3e