Commit 94f02547 authored by Ben Gamari's avatar Ben Gamari Committed by Ben Gamari

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
parent ed6f9fb9
...@@ -122,6 +122,10 @@ hs_atomic_and64(StgWord x, StgWord64 val) ...@@ -122,6 +122,10 @@ hs_atomic_and64(StgWord x, StgWord64 val)
#define __has_builtin(x) 0 #define __has_builtin(x) 0
#endif #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); extern StgWord hs_atomic_nand8(StgWord x, StgWord val);
StgWord StgWord
hs_atomic_nand8(StgWord x, StgWord val) hs_atomic_nand8(StgWord x, StgWord val)
...@@ -168,6 +172,8 @@ hs_atomic_nand64(StgWord x, StgWord64 val) ...@@ -168,6 +172,8 @@ hs_atomic_nand64(StgWord x, StgWord64 val)
} }
#endif #endif
#pragma GCC diagnostic pop
// FetchOrByteArrayOp_Int // FetchOrByteArrayOp_Int
extern StgWord hs_atomic_or8(StgWord x, StgWord val); extern StgWord hs_atomic_or8(StgWord x, StgWord val);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment