summaryrefslogtreecommitdiff
path: root/libraries
diff options
context:
space:
mode:
authorBen Gamari <bgamari.foss@gmail.com>2018-03-08 13:22:37 -0500
committerBen Gamari <ben@smart-cactus.org>2018-03-08 16:08:04 -0500
commit94f02547083cf6df686ea0b95fed050184c533de (patch)
treefba3431c7edae23b377d0b64531ff7814d9370bb /libraries
parented6f9fb9d5a684d2159c29633159c3254cf04deb (diff)
downloadhaskell-94f02547083cf6df686ea0b95fed050184c533de.tar.gz
ghc-prim: Silence -Wsync-nand warning in atomic.c
GCC throws this warning to inform us that __sync_fetch_and_nand's behavior changed in GCC 4.4. However, this causes the build to fail when -Werror is used. Test Plan: Validate with -Werror Subscribers: rwbarton, thomie, carter Differential Revision: https://phabricator.haskell.org/D4481
Diffstat (limited to 'libraries')
-rw-r--r--libraries/ghc-prim/cbits/atomic.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/libraries/ghc-prim/cbits/atomic.c b/libraries/ghc-prim/cbits/atomic.c
index 722d261de8..80d4f39ed0 100644
--- a/libraries/ghc-prim/cbits/atomic.c
+++ b/libraries/ghc-prim/cbits/atomic.c
@@ -122,6 +122,10 @@ hs_atomic_and64(StgWord x, StgWord64 val)
#define __has_builtin(x) 0
#endif
+// Otherwise this fails with -Werror
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wsync-nand"
+
extern StgWord hs_atomic_nand8(StgWord x, StgWord val);
StgWord
hs_atomic_nand8(StgWord x, StgWord val)
@@ -168,6 +172,8 @@ hs_atomic_nand64(StgWord x, StgWord64 val)
}
#endif
+#pragma GCC diagnostic pop
+
// FetchOrByteArrayOp_Int
extern StgWord hs_atomic_or8(StgWord x, StgWord val);