Suppress -Wvolatile gcc warnings in Perl headers for C++20

Seen in Perl 5.34 and earlier
This commit is contained in:
William S Fulton 2022-07-31 16:45:31 +01:00
commit 89f57708e9

View file

@ -4,10 +4,21 @@
#include <stdlib.h>
extern "C" {
#endif
#if __GNUC__ >= 10
#if defined(__cplusplus)
#pragma GCC diagnostic ignored "-Wvolatile"
#endif
#endif
#include "EXTERN.h"
#include "perl.h"
#include "XSUB.h"
#if __GNUC__ >= 10
#pragma GCC diagnostic pop
#endif
/* PERL_REVISION was added in Perl 5.6. */
#if !defined PERL_REVISION || (PERL_REVISION-0 == 5 && PERL_VERSION-0 < 8)
# error SWIG requires Perl >= 5.8.0