[Git][ghc/ghc][wip/rts-warnings] 2 commits: rts: Disable `#pragma GCC`s on clang compilers

Ben Gamari (@bgamari) gitlab at gitlab.haskell.org
Fri Jun 16 13:16:17 UTC 2023



Ben Gamari pushed to branch wip/rts-warnings at Glasgow Haskell Compiler / GHC


Commits:
ef642206 by Ben Gamari at 2023-06-16T09:13:39-04:00
rts: Disable `#pragma GCC`s on clang compilers

Otherwise the build fails due to warnings. See #23530.

- - - - -
b64092b9 by Ben Gamari at 2023-06-16T09:14:27-04:00
rts: Add prototypes in ZeroSlop.c

These aren't called from C but nevertheless the compiler wants them.

- - - - -


2 changed files:

- rts/Hash.c
- rts/ZeroSlop.c


Changes:

=====================================
rts/Hash.c
=====================================
@@ -18,11 +18,13 @@
    since we compile these things these days with cabal we can no longer
    specify optimization per file.  So we have to resort to pragmas.  */
 #if defined(__GNUC__) || defined(__GNUG__)
+#if !defined(__clang__)
 #if !defined(DEBUG)
 #pragma GCC push_options
 #pragma GCC optimize ("O3")
 #endif
 #endif
+#endif
 
 #define XXH_NAMESPACE __rts_
 #define XXH_STATIC_LINKING_ONLY   /* access advanced declarations */


=====================================
rts/ZeroSlop.c
=====================================
@@ -11,16 +11,22 @@
 
 #include "Rts.h"
 
+void stg_overwritingClosure (StgClosure *p);
+
 void stg_overwritingClosure (StgClosure *p)
 {
     overwritingClosure(p);
 }
 
+void stg_overwritingMutableClosureOfs (StgClosure *p, uint32_t offset);
+
 void stg_overwritingMutableClosureOfs (StgClosure *p, uint32_t offset)
 {
     overwritingMutableClosureOfs(p, offset);
 }
 
+void stg_overwritingClosureSize (StgClosure *p, uint32_t size);
+
 void stg_overwritingClosureSize (StgClosure *p, uint32_t size /* in words */)
 {
     overwritingClosureSize(p, size);



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/2d7d091004618a46f236cdb5f2039ffc55ce2fb1...b64092b9318132b6409105d1011d835930a45173

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/2d7d091004618a46f236cdb5f2039ffc55ce2fb1...b64092b9318132b6409105d1011d835930a45173
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20230616/08306ae1/attachment-0001.html>


More information about the ghc-commits mailing list