[Git][ghc/ghc][wip/rts-warnings] 3 commits: rts: Disable `#pragma GCC`s on clang compilers
Ben Gamari (@bgamari)
gitlab at gitlab.haskell.org
Tue Jun 20 04:01:58 UTC 2023
Ben Gamari pushed to branch wip/rts-warnings at Glasgow Haskell Compiler / GHC
Commits:
1c9de7d4 by Ben Gamari at 2023-06-20T00:00:19-04:00
rts: Disable `#pragma GCC`s on clang compilers
Otherwise the build fails due to warnings. See #23530.
- - - - -
632fecc8 by Ben Gamari at 2023-06-20T00:00:19-04:00
rts: Fix capitalization of prototype
- - - - -
a623a3da by Ben Gamari at 2023-06-20T00:01:03-04:00
rts: Fix incorrect format specifier
- - - - -
3 changed files:
- rts/Hash.c
- rts/Threads.c
- rts/include/rts/storage/ClosureMacros.h
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 */
@@ -565,7 +567,9 @@ int keyCountHashTable (HashTable *table)
#if defined(__GNUC__) || defined(__GNUG__)
+#if !defined(__clang__)
#if !defined(DEBUG)
#pragma GCC pop_options
#endif
#endif
+#endif
=====================================
rts/Threads.c
=====================================
@@ -1013,10 +1013,10 @@ printGlobalThreads(void)
for (uint32_t g = 0; g < RtsFlags.GcFlags.generations; g++) {
debugBelch("\ngen %d\n", g);
for (StgTSO *t = generations[g].threads; t != END_TSO_QUEUE; t = t->global_link) {
- debugBelch("thread %p (id=%lu)\n", t, t->id);
+ debugBelch("thread %p (id=%lu)\n", t, (unsigned long)t->id);
}
for (StgTSO *t = generations[g].old_threads; t != END_TSO_QUEUE; t = t->global_link) {
- debugBelch("thread %p (id=%lu) (old)\n", t, t->id);
+ debugBelch("thread %p (id=%lu) (old)\n", t, (unsigned long)t->id);
}
}
}
=====================================
rts/include/rts/storage/ClosureMacros.h
=====================================
@@ -623,7 +623,7 @@ INLINE_HEADER void overwritingMutableClosureOfs (StgClosure *p, uint32_t offset)
}
// Version of 'overwritingClosure' which takes closure size as argument.
-void stg_OverwritingClosureSize (StgClosure *p, uint32_t size /* in words */);
+void stg_overwritingClosureSize (StgClosure *p, uint32_t size /* in words */);
INLINE_HEADER void overwritingClosureSize (StgClosure *p, uint32_t size)
{
// This function is only called from stg_AP_STACK so we can assume it's not
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/909d36c86aab743ed3462c2a1916e6e140f4fb39...a623a3dad3dc9b4e74c5c2562b9f9a0058720d29
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/909d36c86aab743ed3462c2a1916e6e140f4fb39...a623a3dad3dc9b4e74c5c2562b9f9a0058720d29
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/20230620/1efa6d8c/attachment-0001.html>
More information about the ghc-commits
mailing list