* lib/glthread/thread.c (gl_thread_create):
When threading is disabled, this function is _Noreturn.
---
 ChangeLog             | 6 ++++++
 lib/glthread/thread.c | 4 ++++
 2 files changed, 10 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index 01b67ea0ae..79543f03c3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2026-04-25  Paul Eggert  <[email protected]>
+
+       thread: pacify gcc -Wsuggest-attribute=noreturn
+       * lib/glthread/thread.c (gl_thread_create):
+       When threading is disabled, this function is _Noreturn.
+
 2026-04-25  Bruno Haible  <[email protected]>
 
        regex: Remove misplaced comment.
diff --git a/lib/glthread/thread.c b/lib/glthread/thread.c
index 8182c7fda8..f08a28c0da 100644
--- a/lib/glthread/thread.c
+++ b/lib/glthread/thread.c
@@ -204,6 +204,10 @@ const gl_thread_t gl_null_thread /* = { .p = NULL } */;
 
 /* ========================================================================= */
 
+#if !(USE_ISOC_THREADS || USE_POSIX_THREADS || USE_ISOC_AND_POSIX_THREADS \
+      || USE_WINDOWS_THREADS)
+_Noreturn
+#endif
 gl_thread_t
 gl_thread_create (void *(*func) (void *arg), void *arg)
 {
-- 
2.51.0


Reply via email to