Fix compilation stopper on macOS with -Werror
authorRichard Eisenberg <rae@cs.brynmawr.edu>
Mon, 26 Mar 2018 16:45:59 +0000 (12:45 -0400)
committerRichard Eisenberg <rae@cs.brynmawr.edu>
Mon, 26 Mar 2018 21:23:48 +0000 (17:23 -0400)
Commit 94f02547083cf6df686ea0b95fed050184c533de
added some pragmas that allow GCC to compile GHC, but stop
macOS's clang. This adds another counter-pragma to halp
clang lumber along, too.

Fixes #14977.

libraries/ghc-prim/cbits/atomic.c

index 80d4f39..b238041 100644 (file)
@@ -123,8 +123,10 @@ hs_atomic_and64(StgWord x, StgWord64 val)
 #endif
 
 // Otherwise this fails with -Werror
+#if defined(__GNUC__) && !defined(__clang__)
 #pragma GCC diagnostic push
 #pragma GCC diagnostic ignored "-Wsync-nand"
+#endif
 
 extern StgWord hs_atomic_nand8(StgWord x, StgWord val);
 StgWord