From 571165df2691f53783ebb8a158a48a27b25f5d94 Mon Sep 17 00:00:00 2001 From: Andrew Johnson Date: Mon, 4 Jul 2022 15:55:18 -0500 Subject: [PATCH] Stop Clang-12 warnings from Perl XS code --- modules/ca/src/perl/Cap5.xs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/modules/ca/src/perl/Cap5.xs b/modules/ca/src/perl/Cap5.xs index 6d06a15f1..e17fcbaf0 100644 --- a/modules/ca/src/perl/Cap5.xs +++ b/modules/ca/src/perl/Cap5.xs @@ -12,6 +12,13 @@ * here and just generates unnecessary compiler warnings. */ #define REENTRINC +/* Clang-12 and later generates many warnings about compound token */ +#ifdef __has_warning +# if __has_warning("-Wcompound-token-split-by-macro") +# pragma clang diagnostic ignored "-Wcompound-token-split-by-macro" +# endif +#endif + #include "EXTERN.h" #include "perl.h" #include "XSUB.h"