This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perl.h: Add comment about clang warnings
authorKarl Williamson <khw@cpan.org>
Fri, 2 Mar 2018 02:30:42 +0000 (19:30 -0700)
committerKarl Williamson <khw@cpan.org>
Fri, 2 Mar 2018 02:33:51 +0000 (19:33 -0700)
Commit b2f82b52000c3bfe6e6df200c775e2a639d91552 failed to document
details about the clang warnings.  This commit adds a link to clang's
documentation

perl.h

diff --git a/perl.h b/perl.h
index d20fdd0..deafa0f 100644 (file)
--- a/perl.h
+++ b/perl.h
@@ -5588,7 +5588,11 @@ typedef struct am_table_short AMTS;
  *
  * The single argument is a condition to test for, and if true, to panic, as
  * this would be an attempt to complement the LC_NUMERIC state, and we're not
- * supposed to because it's locked */
+ * supposed to because it's locked.
+ *
+ * Clang improperly gives warnings for this, if not silenced:
+ * https://clang.llvm.org/docs/ThreadSafetyAnalysis.html#conditional-locks
+ * */
 #    define LC_NUMERIC_LOCK(cond_to_panic_if_already_locked)                \
         CLANG_DIAG_IGNORE(-Wthread-safety)                                 \
         STMT_START {                                                        \