[commit: ghc] master: Fix compilation stopper on macOS with -Werror (97e1f30)
git at git.haskell.org
git at git.haskell.org
Mon Mar 26 21:25:37 UTC 2018
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/97e1f300e4f6aef06863d056dc7992fef6b21538/ghc
>---------------------------------------------------------------
commit 97e1f300e4f6aef06863d056dc7992fef6b21538
Author: Richard Eisenberg <rae at cs.brynmawr.edu>
Date: Mon Mar 26 12:45:59 2018 -0400
Fix compilation stopper on macOS with -Werror
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.
>---------------------------------------------------------------
97e1f300e4f6aef06863d056dc7992fef6b21538
libraries/ghc-prim/cbits/atomic.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libraries/ghc-prim/cbits/atomic.c b/libraries/ghc-prim/cbits/atomic.c
index 80d4f39..b238041 100644
--- a/libraries/ghc-prim/cbits/atomic.c
+++ b/libraries/ghc-prim/cbits/atomic.c
@@ -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
More information about the ghc-commits
mailing list