Fix closeOverKinds to use unclosed sets internally
[ghc.git] / mk / warnings.mk
index 63388fb..0ae81bf 100644 (file)
@@ -11,6 +11,11 @@ SRC_HC_OPTS     += -Wall
 SRC_HC_OPTS_STAGE1 += $(WERROR)
 SRC_HC_OPTS_STAGE2 += $(WERROR)
 
+# Enable -Wcpp-undef for GHC components only, as we don't (currently) expect
+# core libraries to build in this configuration (see #13636).
+GhcRtsHcOpts    += -Wcpp-undef
+GhcStage1HcOpts += -Wcpp-undef
+GhcStage2HcOpts += -Wcpp-undef
 
 ifneq "$(GccIsClang)" "YES"
 
@@ -21,10 +26,14 @@ ifeq "$(GccLT46)" "NO"
 ifneq "$(HostOS_CPP)" "mingw32"
 SRC_CC_WARNING_OPTS += -Werror=unused-but-set-variable
 endif
-# gcc 4.6 gives 3 warning for giveCapabilityToTask not being inlined
-SRC_CC_WARNING_OPTS += -Wno-error=inline
 endif
 
+# Suppress the warning about __sync_fetch_and_nand (#9678).
+libraries/ghc-prim/cbits/atomic_CC_OPTS += -Wno-sync-nand
+# gcc 4.6 gives 3 warnings for giveCapabilityToTask not being inlined
+# gcc 4.4 gives 2 warnings for lockClosure not being inlined
+SRC_CC_WARNING_OPTS += -Wno-error=inline
+
 else
 
 # Don't warn about unknown GCC pragmas when using clang
@@ -50,6 +59,7 @@ libraries/bytestring_dist-install_EXTRA_HC_OPTS += -Wno-inline-rule-shadowing
 # Turn off import warnings for bad unused imports
 utils/haddock_dist_EXTRA_HC_OPTS += -Wno-unused-imports
 libraries/vector_dist-install_EXTRA_HC_OPTS += -Wno-unused-imports
+libraries/directory_dist-install_EXTRA_HC_OPTS += -Wno-unused-imports
 
 # haddock's attoparsec uses deprecated `inlinePerformIO`
 utils/haddock_dist_EXTRA_HC_OPTS += -Wno-deprecations
@@ -70,6 +80,7 @@ endif
 libraries/haskeline_dist-install_EXTRA_HC_OPTS += -Wno-deprecations
 libraries/haskeline_dist-install_EXTRA_HC_OPTS += -Wno-unused-imports
 libraries/haskeline_dist-install_EXTRA_HC_OPTS += -Wno-redundant-constraints
+libraries/haskeline_dist-install_EXTRA_HC_OPTS += -Wno-simplifiable-class-constraints
 
 
 # temporarily turn off unused-imports warnings for pretty
@@ -106,6 +117,11 @@ libraries/transformers_dist-install_EXTRA_HC_OPTS += -Wno-unused-matches -Wno-un
 libraries/transformers_dist-install_EXTRA_HC_OPTS += -Wno-redundant-constraints
 libraries/transformers_dist-install_EXTRA_HC_OPTS += -Wno-orphans
 
+# parsec has various warnings
+libraries/parsec_dist-install_EXTRA_HC_OPTS += -Wno-name-shadowing -Wno-unused-matches
+libraries/parsec_dist-install_EXTRA_HC_OPTS += -Wno-unused-do-bind -Wno-missing-signatures
+libraries/parsec_dist-install_EXTRA_HC_OPTS += -Wno-unused-imports -Wno-type-defaults
+
 # Turn of trustworthy-safe warning
 libraries/base_dist-install_EXTRA_HC_OPTS += -Wno-trustworthy-safe
 libraries/ghc-prim_dist-install_EXTRA_HC_OPTS += -Wno-trustworthy-safe