diff options
author | Bernhard Rosenkränzer <bero@lindev.ch> | 2022-11-29 00:41:27 +0100 |
---|---|---|
committer | Bernhard Rosenkränzer <bero@lindev.ch> | 2022-11-29 00:55:07 +0100 |
commit | 8ece583aa00ef1e5b2b80bfbcdad42e6e9178da2 (patch) | |
tree | eb0d1784f37ede9734e8db273ab808833a334024 /Lib | |
parent | 60af317956714c23452c1593575511e0577e08ac (diff) | |
download | swig-8ece583aa00ef1e5b2b80bfbcdad42e6e9178da2.tar.gz |
Fix push/pop mismatch
Without this, perlhead.swg does `#pragma GCC diagnostic pop`
if `__GNUC__ >= 10` - without any prior `#pragma GCC diagnostic push`.
There's also a mismatch between the conditions that trigger
`#pragma GCC diagnostic ignored` (where the `push` should be)
and the attempt to `#pragma GCC diagnostic pop`.
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/perl5/perlhead.swg | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/perl5/perlhead.swg b/Lib/perl5/perlhead.swg index 773adee92..11ea50a9e 100644 --- a/Lib/perl5/perlhead.swg +++ b/Lib/perl5/perlhead.swg @@ -7,6 +7,7 @@ extern "C" { #if __GNUC__ >= 10 #if defined(__cplusplus) +#pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wvolatile" #endif #endif @@ -16,8 +17,10 @@ extern "C" { #include "XSUB.h" #if __GNUC__ >= 10 +#if defined(__cplusplus) #pragma GCC diagnostic pop #endif +#endif /* PERL_REVISION was added in Perl 5.6. */ #if !defined PERL_REVISION || (PERL_REVISION-0 == 5 && PERL_VERSION-0 < 8) |