Skip to content

Commit 1309c4e

Browse files
berolinuxwsfulton
authored andcommitted
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`.
1 parent 86e2268 commit 1309c4e

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

CHANGES.current

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ the issue number to the end of the URL: https://github.com/swig/swig/issues/
77
Version 4.1.1 (30 Nov 2022)
88
===========================
99

10+
2022-11-29: bero
11+
Fix mismatch between #pragma GCC diagnostic push and pop statements
12+
1013
2022-11-26: wsfulton
1114
#2449 Fix undefined behaviour in ccache-swig calculating md4 hashes and possibly
1215
also handling errors when CCACHE_CPP2 is set.

Lib/perl5/perlhead.swg

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ extern "C" {
77

88
#if __GNUC__ >= 10
99
#if defined(__cplusplus)
10+
#pragma GCC diagnostic push
1011
#pragma GCC diagnostic ignored "-Wvolatile"
1112
#endif
1213
#endif
@@ -16,8 +17,10 @@ extern "C" {
1617
#include "XSUB.h"
1718

1819
#if __GNUC__ >= 10
20+
#if defined(__cplusplus)
1921
#pragma GCC diagnostic pop
2022
#endif
23+
#endif
2124

2225
/* PERL_REVISION was added in Perl 5.6. */
2326
#if !defined PERL_REVISION || (PERL_REVISION-0 == 5 && PERL_VERSION-0 < 8)

0 commit comments

Comments
 (0)