This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
avoid generating an empty statement outside a function on non-clang
[perl5.git] / dist / threads / threads.xs
index 891d4d1..d35eee1 100644 (file)
@@ -1021,7 +1021,9 @@ S_ithread_create(
 CLANG_DIAG_IGNORE(-Wthread-safety);
 /* warning: mutex 'thread->mutex' is not held on every path through here [-Wthread-safety-analysis] */
 }
+#if defined(__clang__) || defined(__clang)
 CLANG_DIAG_RESTORE;
+#endif
 
 #endif /* USE_ITHREADS */