summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--compiler/GHC/Driver/Errors.hs16
-rw-r--r--testsuite/tests/backpack/should_compile/bkp09.stderr2
-rw-r--r--testsuite/tests/backpack/should_compile/bkp15.stderr2
-rw-r--r--testsuite/tests/deSugar/should_compile/ds041.stderr2
-rw-r--r--testsuite/tests/deriving/should_compile/T4325.stderr4
-rw-r--r--testsuite/tests/deriving/should_compile/T4966.stderr2
-rw-r--r--testsuite/tests/deriving/should_compile/drv-foldable-traversable1.stderr2
-rw-r--r--testsuite/tests/deriving/should_compile/drv-functor1.stderr2
-rw-r--r--testsuite/tests/deriving/should_fail/drvfail-functor2.stderr2
-rw-r--r--testsuite/tests/driver/T11429a.stderr3
-rw-r--r--testsuite/tests/driver/T11429c.stderr2
-rw-r--r--testsuite/tests/driver/T12056b.stderr3
-rw-r--r--testsuite/tests/driver/T12056c.stderr5
-rw-r--r--testsuite/tests/driver/T2464.stderr4
-rw-r--r--testsuite/tests/generics/GenCannotDoRep0_0.stderr2
-rw-r--r--testsuite/tests/generics/GenCannotDoRep0_1.stderr2
-rw-r--r--testsuite/tests/generics/GenCannotDoRep1_1.stderr2
-rw-r--r--testsuite/tests/ghci/scripts/ghci031.stderr2
-rw-r--r--testsuite/tests/indexed-types/should_compile/T3418.stderr4
-rw-r--r--testsuite/tests/indexed-types/should_compile/T3787.stderr2
-rw-r--r--testsuite/tests/parser/should_compile/T16619.stderr2
-rw-r--r--testsuite/tests/parser/should_compile/read018.stderr4
-rw-r--r--testsuite/tests/parser/should_fail/T16270.stderr2
-rw-r--r--testsuite/tests/partial-sigs/should_fail/WildcardInADTContext1.stderr2
-rw-r--r--testsuite/tests/partial-sigs/should_fail/WildcardInADTContext2.stderr2
-rw-r--r--testsuite/tests/rename/should_fail/rnfail055.stderr4
-rw-r--r--testsuite/tests/roles/should_compile/T8958.stderr2
-rw-r--r--testsuite/tests/safeHaskell/safeInfered/SafeInfered05.stderr2
-rw-r--r--testsuite/tests/safeHaskell/safeInfered/UnsafeInfered18.stderr2
-rw-r--r--testsuite/tests/stranal/should_compile/str001.stderr4
-rw-r--r--testsuite/tests/typecheck/should_compile/T17567StupidThetaB.stderr2
-rw-r--r--testsuite/tests/typecheck/should_compile/T2478.stderr4
-rw-r--r--testsuite/tests/typecheck/should_compile/T4355.stderr2
-rw-r--r--testsuite/tests/typecheck/should_compile/tc182.stderr4
-rw-r--r--testsuite/tests/typecheck/should_fail/T17567StupidTheta.stderr2
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail067.stderr2
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail102.stderr2
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail125.stderr2
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail133.stderr2
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail137.stderr2
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail151.stderr2
41 files changed, 55 insertions, 62 deletions
diff --git a/compiler/GHC/Driver/Errors.hs b/compiler/GHC/Driver/Errors.hs
index eafcfe73f3..362282d1b9 100644
--- a/compiler/GHC/Driver/Errors.hs
+++ b/compiler/GHC/Driver/Errors.hs
@@ -36,22 +36,12 @@ printBagOfErrors logger dflags bag_of_errors
handleFlagWarnings :: Logger -> DynFlags -> [CmdLine.Warn] -> IO ()
handleFlagWarnings logger dflags warns = do
- let warns' = filter (should_print_warning dflags . CmdLine.warnReason) warns
- -- It would be nicer if warns :: [Located SDoc], but that
+ let -- It would be nicer if warns :: [Located SDoc], but that
-- has circular import problems.
- bag = listToBag [ mkPlainMsgEnvelope dflags WarningWithoutFlag loc (text warn)
- | CmdLine.Warn _ (L loc warn) <- warns' ]
+ bag = listToBag [ mkPlainMsgEnvelope dflags reason loc (text warn)
+ | CmdLine.Warn reason (L loc warn) <- warns ]
printOrThrowDiagnostics logger dflags bag
- where
- -- Given a warn reason, check to see if it's associated -W opt is enabled
- should_print_warning :: DynFlags -> DiagnosticReason -> Bool
- should_print_warning dflags (WarningWithFlag Opt_WarnDeprecatedFlags)
- = wopt Opt_WarnDeprecatedFlags dflags
- should_print_warning dflags (WarningWithFlag Opt_WarnUnrecognisedWarningFlags)
- = wopt Opt_WarnUnrecognisedWarningFlags dflags
- should_print_warning _ _
- = True
-- | Given a bag of diagnostics, turn them into an exception if
-- any has 'SevError', or print them out otherwise.
diff --git a/testsuite/tests/backpack/should_compile/bkp09.stderr b/testsuite/tests/backpack/should_compile/bkp09.stderr
index 7428ab3eb8..1cb9ac5819 100644
--- a/testsuite/tests/backpack/should_compile/bkp09.stderr
+++ b/testsuite/tests/backpack/should_compile/bkp09.stderr
@@ -1,5 +1,5 @@
-bkp09.bkp:1:26: warning:
+bkp09.bkp:1:26: warning: [-Wdeprecated-flags (in -Wdefault)]
-XDatatypeContexts is deprecated: It was widely considered a misfeature, and has been removed from the Haskell language.
[1 of 5] Processing p
[1 of 1] Compiling H[sig] ( p/H.hsig, nothing )
diff --git a/testsuite/tests/backpack/should_compile/bkp15.stderr b/testsuite/tests/backpack/should_compile/bkp15.stderr
index d1f29fae2c..a3c1b83851 100644
--- a/testsuite/tests/backpack/should_compile/bkp15.stderr
+++ b/testsuite/tests/backpack/should_compile/bkp15.stderr
@@ -1,5 +1,5 @@
-bkp15.bkp:1:26: warning:
+bkp15.bkp:1:26: warning: [-Wdeprecated-flags (in -Wdefault)]
-XDatatypeContexts is deprecated: It was widely considered a misfeature, and has been removed from the Haskell language.
[1 of 5] Processing p
[1 of 1] Compiling H[sig] ( p/H.hsig, nothing )
diff --git a/testsuite/tests/deSugar/should_compile/ds041.stderr b/testsuite/tests/deSugar/should_compile/ds041.stderr
index 5c90513ed1..0455c44516 100644
--- a/testsuite/tests/deSugar/should_compile/ds041.stderr
+++ b/testsuite/tests/deSugar/should_compile/ds041.stderr
@@ -1,5 +1,5 @@
-ds041.hs:1:14: warning:
+ds041.hs:1:14: warning: [-Wdeprecated-flags (in -Wdefault)]
-XDatatypeContexts is deprecated: It was widely considered a misfeature, and has been removed from the Haskell language.
ds041.hs:16:7: warning: [-Wmissing-fields (in -Wdefault)]
diff --git a/testsuite/tests/deriving/should_compile/T4325.stderr b/testsuite/tests/deriving/should_compile/T4325.stderr
index 90ef1de92d..2fd71e37f8 100644
--- a/testsuite/tests/deriving/should_compile/T4325.stderr
+++ b/testsuite/tests/deriving/should_compile/T4325.stderr
@@ -1,3 +1,3 @@
-T4325.hs:1:14:
- Warning: -XDatatypeContexts is deprecated: It was widely considered a misfeature, and has been removed from the Haskell language.
+T4325.hs:1:14: warning: [-Wdeprecated-flags (in -Wdefault)]
+ -XDatatypeContexts is deprecated: It was widely considered a misfeature, and has been removed from the Haskell language.
diff --git a/testsuite/tests/deriving/should_compile/T4966.stderr b/testsuite/tests/deriving/should_compile/T4966.stderr
index 9cd16e50f2..a705c20793 100644
--- a/testsuite/tests/deriving/should_compile/T4966.stderr
+++ b/testsuite/tests/deriving/should_compile/T4966.stderr
@@ -1,5 +1,5 @@
-T4966.hs:3:14: warning:
+T4966.hs:3:14: warning: [-Wdeprecated-flags (in -Wdefault)]
-XDatatypeContexts is deprecated: It was widely considered a misfeature, and has been removed from the Haskell language.
T4966.hs:35:30: warning: [-Wmissing-methods (in -Wdefault)]
diff --git a/testsuite/tests/deriving/should_compile/drv-foldable-traversable1.stderr b/testsuite/tests/deriving/should_compile/drv-foldable-traversable1.stderr
index e8dc7162c2..fa9c0b82c1 100644
--- a/testsuite/tests/deriving/should_compile/drv-foldable-traversable1.stderr
+++ b/testsuite/tests/deriving/should_compile/drv-foldable-traversable1.stderr
@@ -1,3 +1,3 @@
-drv-foldable-traversable1.hs:4:32: warning:
+drv-foldable-traversable1.hs:4:32: warning: [-Wdeprecated-flags (in -Wdefault)]
-XDatatypeContexts is deprecated: It was widely considered a misfeature, and has been removed from the Haskell language.
diff --git a/testsuite/tests/deriving/should_compile/drv-functor1.stderr b/testsuite/tests/deriving/should_compile/drv-functor1.stderr
index 5592b7d141..015dc28f87 100644
--- a/testsuite/tests/deriving/should_compile/drv-functor1.stderr
+++ b/testsuite/tests/deriving/should_compile/drv-functor1.stderr
@@ -1,3 +1,3 @@
-drv-functor1.hs:6:14: warning:
+drv-functor1.hs:6:14: warning: [-Wdeprecated-flags (in -Wdefault)]
-XDatatypeContexts is deprecated: It was widely considered a misfeature, and has been removed from the Haskell language.
diff --git a/testsuite/tests/deriving/should_fail/drvfail-functor2.stderr b/testsuite/tests/deriving/should_fail/drvfail-functor2.stderr
index 1c3a0238a4..3fd7f14b4c 100644
--- a/testsuite/tests/deriving/should_fail/drvfail-functor2.stderr
+++ b/testsuite/tests/deriving/should_fail/drvfail-functor2.stderr
@@ -1,5 +1,5 @@
-drvfail-functor2.hs:2:29: warning:
+drvfail-functor2.hs:2:29: warning: [-Wdeprecated-flags (in -Wdefault)]
-XDatatypeContexts is deprecated: It was widely considered a misfeature, and has been removed from the Haskell language.
drvfail-functor2.hs:8:14: error:
diff --git a/testsuite/tests/driver/T11429a.stderr b/testsuite/tests/driver/T11429a.stderr
index c52b89e33d..4c41f5ed6b 100644
--- a/testsuite/tests/driver/T11429a.stderr
+++ b/testsuite/tests/driver/T11429a.stderr
@@ -1,2 +1,3 @@
-on the commandline: warning: unrecognised warning flag: -Wfoobar
+on the commandline: warning: [-Wunrecognised-warning-flags (in -Wdefault)]
+ unrecognised warning flag: -Wfoobar
diff --git a/testsuite/tests/driver/T11429c.stderr b/testsuite/tests/driver/T11429c.stderr
index 6fee70dc04..1424753e4e 100644
--- a/testsuite/tests/driver/T11429c.stderr
+++ b/testsuite/tests/driver/T11429c.stderr
@@ -1,3 +1,3 @@
-on the commandline: error: [-Werror]
+on the commandline: error: [-Wunrecognised-warning-flags, -Werror=unrecognised-warning-flags]
unrecognised warning flag: -Wfoobar
diff --git a/testsuite/tests/driver/T12056b.stderr b/testsuite/tests/driver/T12056b.stderr
index e1e870a828..bd475e4d1e 100644
--- a/testsuite/tests/driver/T12056b.stderr
+++ b/testsuite/tests/driver/T12056b.stderr
@@ -1,2 +1,3 @@
-on the commandline: warning: unrecognised warning flag: -Wbar
+on the commandline: warning: [-Wunrecognised-warning-flags (in -Wdefault)]
+ unrecognised warning flag: -Wbar
diff --git a/testsuite/tests/driver/T12056c.stderr b/testsuite/tests/driver/T12056c.stderr
index 0f96367dc2..3a924a38da 100644
--- a/testsuite/tests/driver/T12056c.stderr
+++ b/testsuite/tests/driver/T12056c.stderr
@@ -1,5 +1,6 @@
-on the commandline: warning:
+on the commandline: warning: [-Wdeprecated-flags (in -Wdefault)]
-XOverlappingInstances is deprecated: instead use per-instance pragmas OVERLAPPING/OVERLAPPABLE/OVERLAPS
-on the commandline: warning: unrecognised warning flag: -Wbar
+on the commandline: warning: [-Wunrecognised-warning-flags (in -Wdefault)]
+ unrecognised warning flag: -Wbar
diff --git a/testsuite/tests/driver/T2464.stderr b/testsuite/tests/driver/T2464.stderr
index 92e5e640c6..3d0074fc82 100644
--- a/testsuite/tests/driver/T2464.stderr
+++ b/testsuite/tests/driver/T2464.stderr
@@ -1,3 +1,3 @@
-T2464.hs:3:16:
- Warning: -fffi is deprecated: use -XForeignFunctionInterface or pragma {-# LANGUAGE ForeignFunctionInterface #-} instead
+T2464.hs:3:16: warning: [-Wdeprecated-flags (in -Wdefault)]
+ -fffi is deprecated: use -XForeignFunctionInterface or pragma {-# LANGUAGE ForeignFunctionInterface #-} instead
diff --git a/testsuite/tests/generics/GenCannotDoRep0_0.stderr b/testsuite/tests/generics/GenCannotDoRep0_0.stderr
index 02300d4140..c808430dde 100644
--- a/testsuite/tests/generics/GenCannotDoRep0_0.stderr
+++ b/testsuite/tests/generics/GenCannotDoRep0_0.stderr
@@ -1,5 +1,5 @@
-GenCannotDoRep0_0.hs:6:14: warning:
+GenCannotDoRep0_0.hs:6:14: warning: [-Wdeprecated-flags (in -Wdefault)]
-XDatatypeContexts is deprecated: It was widely considered a misfeature, and has been removed from the Haskell language.
GenCannotDoRep0_0.hs:13:45: error:
diff --git a/testsuite/tests/generics/GenCannotDoRep0_1.stderr b/testsuite/tests/generics/GenCannotDoRep0_1.stderr
index cb1221c413..e99240d2c6 100644
--- a/testsuite/tests/generics/GenCannotDoRep0_1.stderr
+++ b/testsuite/tests/generics/GenCannotDoRep0_1.stderr
@@ -1,5 +1,5 @@
-GenCannotDoRep0_1.hs:1:29: Warning:
+GenCannotDoRep0_1.hs:1:29: warning: [-Wdeprecated-flags (in -Wdefault)]
-XDatatypeContexts is deprecated: It was widely considered a misfeature, and has been removed from the Haskell language.
GenCannotDoRep0_1.hs:8:49:
diff --git a/testsuite/tests/generics/GenCannotDoRep1_1.stderr b/testsuite/tests/generics/GenCannotDoRep1_1.stderr
index 6e29d008a2..6ed636ffc8 100644
--- a/testsuite/tests/generics/GenCannotDoRep1_1.stderr
+++ b/testsuite/tests/generics/GenCannotDoRep1_1.stderr
@@ -1,5 +1,5 @@
-GenCannotDoRep1_1.hs:1:29: Warning:
+GenCannotDoRep1_1.hs:1:29: warning: [-Wdeprecated-flags (in -Wdefault)]
-XDatatypeContexts is deprecated: It was widely considered a misfeature, and has been removed from the Haskell language.
GenCannotDoRep1_1.hs:8:49:
diff --git a/testsuite/tests/ghci/scripts/ghci031.stderr b/testsuite/tests/ghci/scripts/ghci031.stderr
index 6f72f603e1..7fce54a8f1 100644
--- a/testsuite/tests/ghci/scripts/ghci031.stderr
+++ b/testsuite/tests/ghci/scripts/ghci031.stderr
@@ -1,3 +1,3 @@
-ghci031.hs:1:14: Warning:
+ghci031.hs:1:14: warning: [-Wdeprecated-flags (in -Wdefault)]
-XDatatypeContexts is deprecated: It was widely considered a misfeature, and has been removed from the Haskell language.
diff --git a/testsuite/tests/indexed-types/should_compile/T3418.stderr b/testsuite/tests/indexed-types/should_compile/T3418.stderr
index 657e2a07b7..918d8b0723 100644
--- a/testsuite/tests/indexed-types/should_compile/T3418.stderr
+++ b/testsuite/tests/indexed-types/should_compile/T3418.stderr
@@ -1,3 +1,3 @@
-T3418.hs:1:28:
- Warning: -XDatatypeContexts is deprecated: It was widely considered a misfeature, and has been removed from the Haskell language.
+T3418.hs:1:28: warning: [-Wdeprecated-flags (in -Wdefault)]
+ -XDatatypeContexts is deprecated: It was widely considered a misfeature, and has been removed from the Haskell language.
diff --git a/testsuite/tests/indexed-types/should_compile/T3787.stderr b/testsuite/tests/indexed-types/should_compile/T3787.stderr
index e4da42e230..0d451f3704 100644
--- a/testsuite/tests/indexed-types/should_compile/T3787.stderr
+++ b/testsuite/tests/indexed-types/should_compile/T3787.stderr
@@ -1,3 +1,3 @@
-T3787.hs:20:51: warning:
+T3787.hs:20:51: warning: [-Wdeprecated-flags (in -Wdefault)]
-XOverlappingInstances is deprecated: instead use per-instance pragmas OVERLAPPING/OVERLAPPABLE/OVERLAPS
diff --git a/testsuite/tests/parser/should_compile/T16619.stderr b/testsuite/tests/parser/should_compile/T16619.stderr
index b5dfb89623..68a8bf5da8 100644
--- a/testsuite/tests/parser/should_compile/T16619.stderr
+++ b/testsuite/tests/parser/should_compile/T16619.stderr
@@ -1,3 +1,3 @@
-T16619.hs:2:12: warning:
+T16619.hs:2:12: warning: [-Wdeprecated-flags (in -Wdefault)]
-Wmissing-space-after-bang is deprecated: bang patterns can no longer be written with a space
diff --git a/testsuite/tests/parser/should_compile/read018.stderr b/testsuite/tests/parser/should_compile/read018.stderr
index 30d1315840..ca3e87e266 100644
--- a/testsuite/tests/parser/should_compile/read018.stderr
+++ b/testsuite/tests/parser/should_compile/read018.stderr
@@ -1,3 +1,3 @@
-read018.hs:1:14:
- Warning: -XDatatypeContexts is deprecated: It was widely considered a misfeature, and has been removed from the Haskell language.
+read018.hs:1:14: warning: [-Wdeprecated-flags (in -Wdefault)]
+ -XDatatypeContexts is deprecated: It was widely considered a misfeature, and has been removed from the Haskell language.
diff --git a/testsuite/tests/parser/should_fail/T16270.stderr b/testsuite/tests/parser/should_fail/T16270.stderr
index 6aecc3b264..5bb5bea99b 100644
--- a/testsuite/tests/parser/should_fail/T16270.stderr
+++ b/testsuite/tests/parser/should_fail/T16270.stderr
@@ -1,5 +1,5 @@
-T16270.hs:3:12: warning:
+T16270.hs:3:12: warning: [-Wdeprecated-flags (in -Wdefault)]
-Werror=missing-space-after-bang is deprecated: bang patterns can no longer be written with a space
T16270.hs:8:1: warning: [-Wtabs (in -Wdefault)]
diff --git a/testsuite/tests/partial-sigs/should_fail/WildcardInADTContext1.stderr b/testsuite/tests/partial-sigs/should_fail/WildcardInADTContext1.stderr
index 359d8ddbec..afd7020227 100644
--- a/testsuite/tests/partial-sigs/should_fail/WildcardInADTContext1.stderr
+++ b/testsuite/tests/partial-sigs/should_fail/WildcardInADTContext1.stderr
@@ -1,5 +1,5 @@
-WildcardInADTContext1.hs:1:37: warning:
+WildcardInADTContext1.hs:1:37: warning: [-Wdeprecated-flags (in -Wdefault)]
-XDatatypeContexts is deprecated: It was widely considered a misfeature, and has been removed from the Haskell language.
WildcardInADTContext1.hs:4:13: error:
diff --git a/testsuite/tests/partial-sigs/should_fail/WildcardInADTContext2.stderr b/testsuite/tests/partial-sigs/should_fail/WildcardInADTContext2.stderr
index 43756593d8..441f46466b 100644
--- a/testsuite/tests/partial-sigs/should_fail/WildcardInADTContext2.stderr
+++ b/testsuite/tests/partial-sigs/should_fail/WildcardInADTContext2.stderr
@@ -1,5 +1,5 @@
-WildcardInADTContext2.hs:1:53: warning:
+WildcardInADTContext2.hs:1:53: warning: [-Wdeprecated-flags (in -Wdefault)]
-XDatatypeContexts is deprecated: It was widely considered a misfeature, and has been removed from the Haskell language.
WildcardInADTContext2.hs:4:10: error:
diff --git a/testsuite/tests/rename/should_fail/rnfail055.stderr b/testsuite/tests/rename/should_fail/rnfail055.stderr
index 28b20d989a..5034a85ec2 100644
--- a/testsuite/tests/rename/should_fail/rnfail055.stderr
+++ b/testsuite/tests/rename/should_fail/rnfail055.stderr
@@ -1,8 +1,8 @@
-RnFail055.hs:2:73: warning:
+RnFail055.hs:2:73: warning: [-Wdeprecated-flags (in -Wdefault)]
-XDatatypeContexts is deprecated: It was widely considered a misfeature, and has been removed from the Haskell language.
-RnFail055.hs-boot:2:73: warning:
+RnFail055.hs-boot:2:73: warning: [-Wdeprecated-flags (in -Wdefault)]
-XDatatypeContexts is deprecated: It was widely considered a misfeature, and has been removed from the Haskell language.
RnFail055.hs-boot:5:1: error:
diff --git a/testsuite/tests/roles/should_compile/T8958.stderr b/testsuite/tests/roles/should_compile/T8958.stderr
index 6cf07483d0..3247b4b0d4 100644
--- a/testsuite/tests/roles/should_compile/T8958.stderr
+++ b/testsuite/tests/roles/should_compile/T8958.stderr
@@ -1,5 +1,5 @@
-T8958.hs:2:31: warning:
+T8958.hs:2:31: warning: [-Wdeprecated-flags (in -Wdefault)]
-XDatatypeContexts is deprecated: It was widely considered a misfeature, and has been removed from the Haskell language.
TYPE CONSTRUCTORS
newtype Map{2} :: * -> * -> *
diff --git a/testsuite/tests/safeHaskell/safeInfered/SafeInfered05.stderr b/testsuite/tests/safeHaskell/safeInfered/SafeInfered05.stderr
index 7815bb7c81..2e9e92a696 100644
--- a/testsuite/tests/safeHaskell/safeInfered/SafeInfered05.stderr
+++ b/testsuite/tests/safeHaskell/safeInfered/SafeInfered05.stderr
@@ -1,5 +1,5 @@
-SafeInfered05.hs:3:14: warning:
+SafeInfered05.hs:3:14: warning: [-Wdeprecated-flags (in -Wdefault)]
-XOverlappingInstances is deprecated: instead use per-instance pragmas OVERLAPPING/OVERLAPPABLE/OVERLAPS
[1 of 2] Compiling SafeInfered05_A ( SafeInfered05_A.hs, SafeInfered05_A.o )
diff --git a/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered18.stderr b/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered18.stderr
index 2e15aa3954..80b8cb2637 100644
--- a/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered18.stderr
+++ b/testsuite/tests/safeHaskell/safeInfered/UnsafeInfered18.stderr
@@ -1,3 +1,3 @@
-UnsafeInfered18.hs:4:14: warning:
+UnsafeInfered18.hs:4:14: warning: [-Wdeprecated-flags (in -Wdefault)]
-XOverlappingInstances is deprecated: instead use per-instance pragmas OVERLAPPING/OVERLAPPABLE/OVERLAPS
diff --git a/testsuite/tests/stranal/should_compile/str001.stderr b/testsuite/tests/stranal/should_compile/str001.stderr
index 968ccf8885..99575b8449 100644
--- a/testsuite/tests/stranal/should_compile/str001.stderr
+++ b/testsuite/tests/stranal/should_compile/str001.stderr
@@ -1,4 +1,4 @@
-str001.hs:1:14:
- Warning: -XDatatypeContexts is deprecated: It was widely considered a misfeature, and has been removed from the Haskell language.
+str001.hs:1:14: warning: [-Wdeprecated-flags (in -Wdefault)]
+ -XDatatypeContexts is deprecated: It was widely considered a misfeature, and has been removed from the Haskell language.
diff --git a/testsuite/tests/typecheck/should_compile/T17567StupidThetaB.stderr b/testsuite/tests/typecheck/should_compile/T17567StupidThetaB.stderr
index 3975d2c54d..ce337297cc 100644
--- a/testsuite/tests/typecheck/should_compile/T17567StupidThetaB.stderr
+++ b/testsuite/tests/typecheck/should_compile/T17567StupidThetaB.stderr
@@ -1,3 +1,3 @@
-T17567StupidThetaB.hs:2:37: warning:
+T17567StupidThetaB.hs:2:37: warning: [-Wdeprecated-flags (in -Wdefault)]
-XDatatypeContexts is deprecated: It was widely considered a misfeature, and has been removed from the Haskell language.
diff --git a/testsuite/tests/typecheck/should_compile/T2478.stderr b/testsuite/tests/typecheck/should_compile/T2478.stderr
index f03324cd15..cd9ab65c12 100644
--- a/testsuite/tests/typecheck/should_compile/T2478.stderr
+++ b/testsuite/tests/typecheck/should_compile/T2478.stderr
@@ -1,3 +1,3 @@
-T2478.hs:1:41:
- Warning: -XDatatypeContexts is deprecated: It was widely considered a misfeature, and has been removed from the Haskell language.
+T2478.hs:1:41: warning: [-Wdeprecated-flags (in -Wdefault)]
+ -XDatatypeContexts is deprecated: It was widely considered a misfeature, and has been removed from the Haskell language.
diff --git a/testsuite/tests/typecheck/should_compile/T4355.stderr b/testsuite/tests/typecheck/should_compile/T4355.stderr
index 77d919f992..6530013f1c 100644
--- a/testsuite/tests/typecheck/should_compile/T4355.stderr
+++ b/testsuite/tests/typecheck/should_compile/T4355.stderr
@@ -1,3 +1,3 @@
-T4355.hs:3:172: warning:
+T4355.hs:3:172: warning: [-Wdeprecated-flags (in -Wdefault)]
-XDatatypeContexts is deprecated: It was widely considered a misfeature, and has been removed from the Haskell language.
diff --git a/testsuite/tests/typecheck/should_compile/tc182.stderr b/testsuite/tests/typecheck/should_compile/tc182.stderr
index bd8397708b..07c3e2ef32 100644
--- a/testsuite/tests/typecheck/should_compile/tc182.stderr
+++ b/testsuite/tests/typecheck/should_compile/tc182.stderr
@@ -1,3 +1,3 @@
-tc182.hs:1:14:
- Warning: -XDatatypeContexts is deprecated: It was widely considered a misfeature, and has been removed from the Haskell language.
+tc182.hs:1:14: warning: [-Wdeprecated-flags (in -Wdefault)]
+ -XDatatypeContexts is deprecated: It was widely considered a misfeature, and has been removed from the Haskell language.
diff --git a/testsuite/tests/typecheck/should_fail/T17567StupidTheta.stderr b/testsuite/tests/typecheck/should_fail/T17567StupidTheta.stderr
index 7ae2b35ab8..425ac8728b 100644
--- a/testsuite/tests/typecheck/should_fail/T17567StupidTheta.stderr
+++ b/testsuite/tests/typecheck/should_fail/T17567StupidTheta.stderr
@@ -1,5 +1,5 @@
-T17567StupidTheta.hs:1:37: warning:
+T17567StupidTheta.hs:1:37: warning: [-Wdeprecated-flags (in -Wdefault)]
-XDatatypeContexts is deprecated: It was widely considered a misfeature, and has been removed from the Haskell language.
T17567StupidTheta.hs:6:1: error:
diff --git a/testsuite/tests/typecheck/should_fail/tcfail067.stderr b/testsuite/tests/typecheck/should_fail/tcfail067.stderr
index 8ffb02faf0..8967f9fdb2 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail067.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail067.stderr
@@ -1,5 +1,5 @@
-tcfail067.hs:1:14: warning:
+tcfail067.hs:1:14: warning: [-Wdeprecated-flags (in -Wdefault)]
-XDatatypeContexts is deprecated: It was widely considered a misfeature, and has been removed from the Haskell language.
tcfail067.hs:12:16: error:
diff --git a/testsuite/tests/typecheck/should_fail/tcfail102.stderr b/testsuite/tests/typecheck/should_fail/tcfail102.stderr
index b7fd16d740..60a101df0c 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail102.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail102.stderr
@@ -1,5 +1,5 @@
-tcfail102.hs:1:14: warning:
+tcfail102.hs:1:14: warning: [-Wdeprecated-flags (in -Wdefault)]
-XDatatypeContexts is deprecated: It was widely considered a misfeature, and has been removed from the Haskell language.
tcfail102.hs:9:15: error:
diff --git a/testsuite/tests/typecheck/should_fail/tcfail125.stderr b/testsuite/tests/typecheck/should_fail/tcfail125.stderr
index 7fe5275d8f..813fa6d0b8 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail125.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail125.stderr
@@ -1,5 +1,5 @@
-tcfail125.hs:1:14: warning:
+tcfail125.hs:1:14: warning: [-Wdeprecated-flags (in -Wdefault)]
-XDatatypeContexts is deprecated: It was widely considered a misfeature, and has been removed from the Haskell language.
tcfail125.hs:11:4: error:
diff --git a/testsuite/tests/typecheck/should_fail/tcfail133.stderr b/testsuite/tests/typecheck/should_fail/tcfail133.stderr
index a88a27e858..f5e2309a81 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail133.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail133.stderr
@@ -1,5 +1,5 @@
-tcfail133.hs:2:61: warning:
+tcfail133.hs:2:61: warning: [-Wdeprecated-flags (in -Wdefault)]
-XDatatypeContexts is deprecated: It was widely considered a misfeature, and has been removed from the Haskell language.
tcfail133.hs:68:7: error:
diff --git a/testsuite/tests/typecheck/should_fail/tcfail137.stderr b/testsuite/tests/typecheck/should_fail/tcfail137.stderr
index 520dcdcc40..3d9f0d0568 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail137.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail137.stderr
@@ -1,5 +1,5 @@
-tcfail137.hs:1:14: Warning:
+tcfail137.hs:1:14: warning: [-Wdeprecated-flags (in -Wdefault)]
-XDatatypeContexts is deprecated: It was widely considered a misfeature, and has been removed from the Haskell language.
tcfail137.hs:8:5:
diff --git a/testsuite/tests/typecheck/should_fail/tcfail151.stderr b/testsuite/tests/typecheck/should_fail/tcfail151.stderr
index 5e4dcfcf2f..6867f351fd 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail151.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail151.stderr
@@ -1,5 +1,5 @@
-tcfail151.hs:1:14: Warning:
+tcfail151.hs:1:14: Warning: [-Wdeprecated-flags (in -Wdefault)]
-XDatatypeContexts is deprecated: It was widely considered a misfeature, and has been removed from the Haskell language.
tcfail151.hs:8:6: