diff options
-rw-r--r-- | dist/Time-HiRes/HiRes.pm | 2 | ||||
-rw-r--r-- | dist/Time-HiRes/HiRes.xs | 25 | ||||
-rw-r--r-- | dist/threads-shared/lib/threads/shared.pm | 4 | ||||
-rw-r--r-- | dist/threads-shared/shared.xs | 20 | ||||
-rw-r--r-- | dist/threads/lib/threads.pm | 4 | ||||
-rw-r--r-- | dist/threads/threads.xs | 24 | ||||
-rw-r--r-- | doio.c | 12 | ||||
-rw-r--r-- | ext/POSIX/POSIX.xs | 4 | ||||
-rw-r--r-- | inline.h | 24 | ||||
-rw-r--r-- | locale.c | 2 | ||||
-rw-r--r-- | perl.h | 34 | ||||
-rw-r--r-- | perlio.c | 4 | ||||
-rw-r--r-- | pp_ctl.c | 4 | ||||
-rw-r--r-- | pp_sys.c | 16 | ||||
-rw-r--r-- | regcomp.c | 4 | ||||
-rw-r--r-- | sv.c | 8 | ||||
-rw-r--r-- | taint.c | 4 | ||||
-rw-r--r-- | toke.c | 12 | ||||
-rw-r--r-- | util.c | 8 |
19 files changed, 112 insertions, 103 deletions
diff --git a/dist/Time-HiRes/HiRes.pm b/dist/Time-HiRes/HiRes.pm index 0ed28a17ff..8a2dab5cf5 100644 --- a/dist/Time-HiRes/HiRes.pm +++ b/dist/Time-HiRes/HiRes.pm @@ -49,7 +49,7 @@ our @EXPORT_OK = qw (usleep sleep ualarm alarm gettimeofday time tv_interval stat lstat utime ); -our $VERSION = '1.9747'; +our $VERSION = '1.9748'; our $XS_VERSION = $VERSION; $VERSION = eval $VERSION; diff --git a/dist/Time-HiRes/HiRes.xs b/dist/Time-HiRes/HiRes.xs index 6b0dba8e68..46a2254a6c 100644 --- a/dist/Time-HiRes/HiRes.xs +++ b/dist/Time-HiRes/HiRes.xs @@ -46,6 +46,15 @@ extern "C" { #define PERL_VERSION_GE(r,v,s) \ (PERL_DECIMAL_VERSION >= PERL_VERSION_DECIMAL(r,v,s)) +#ifndef GCC_DIAG_IGNORE +# define GCC_DIAG_IGNORE(x) +# define GCC_DIAG_RESTORE +#endif +#ifndef GCC_DIAG_IGNORE_STMT +# define GCC_DIAG_IGNORE_STMT(x) GCC_DIAG_IGNORE(x) NOOP +# define GCC_DIAG_RESTORE_STMT GCC_DIAG_RESTORE NOOP +#endif + /* At least ppport.h 3.13 gets this wrong: one really cannot * have NVgf as anything else than "g" under Perl 5.6.x. */ #if PERL_REVISION == 5 && PERL_VERSION == 6 @@ -1338,9 +1347,7 @@ setitimer(which, seconds, interval = 0) /* on some platforms the 1st arg to setitimer is an enum, which * causes -Wc++-compat to complain about passing an int instead */ -#ifdef GCC_DIAG_IGNORE - GCC_DIAG_IGNORE(-Wc++-compat); -#endif + GCC_DIAG_IGNORE_STMT(-Wc++-compat); if (setitimer(which, &newit, &oldit) == 0) { EXTEND(sp, 1); PUSHs(sv_2mortal(newSVnv(TV2NV(oldit.it_value)))); @@ -1349,9 +1356,7 @@ setitimer(which, seconds, interval = 0) PUSHs(sv_2mortal(newSVnv(TV2NV(oldit.it_interval)))); } } -#ifdef GCC_DIAG_RESTORE - GCC_DIAG_RESTORE; -#endif + GCC_DIAG_RESTORE_STMT; void getitimer(which) @@ -1362,9 +1367,7 @@ getitimer(which) /* on some platforms the 1st arg to getitimer is an enum, which * causes -Wc++-compat to complain about passing an int instead */ -#ifdef GCC_DIAG_IGNORE - GCC_DIAG_IGNORE(-Wc++-compat); -#endif + GCC_DIAG_IGNORE_STMT(-Wc++-compat); if (getitimer(which, &nowit) == 0) { EXTEND(sp, 1); PUSHs(sv_2mortal(newSVnv(TV2NV(nowit.it_value)))); @@ -1373,9 +1376,7 @@ getitimer(which) PUSHs(sv_2mortal(newSVnv(TV2NV(nowit.it_interval)))); } } -#ifdef GCC_DIAG_RESTORE - GCC_DIAG_RESTORE; -#endif + GCC_DIAG_RESTORE_STMT; #endif /* #if defined(HAS_GETITIMER) && defined(HAS_SETITIMER) */ diff --git a/dist/threads-shared/lib/threads/shared.pm b/dist/threads-shared/lib/threads/shared.pm index 9be89f33f2..b9ba66e85b 100644 --- a/dist/threads-shared/lib/threads/shared.pm +++ b/dist/threads-shared/lib/threads/shared.pm @@ -7,7 +7,7 @@ use warnings; use Scalar::Util qw(reftype refaddr blessed); -our $VERSION = '1.57'; # Please update the pod, too. +our $VERSION = '1.58'; # Please update the pod, too. my $XS_VERSION = $VERSION; $VERSION = eval $VERSION; @@ -195,7 +195,7 @@ threads::shared - Perl extension for sharing data structures between threads =head1 VERSION -This document describes threads::shared version 1.57 +This document describes threads::shared version 1.58 =head1 SYNOPSIS diff --git a/dist/threads-shared/shared.xs b/dist/threads-shared/shared.xs index 40207aa88b..d0f7d1e070 100644 --- a/dist/threads-shared/shared.xs +++ b/dist/threads-shared/shared.xs @@ -128,6 +128,15 @@ # include "shared.h" #endif +#ifndef CLANG_DIAG_IGNORE +# define CLANG_DIAG_IGNORE(x) +# define CLANG_DIAG_RESTORE +#endif +#ifndef CLANG_DIAG_IGNORE_STMT +# define CLANG_DIAG_IGNORE_STMT(x) CLANG_DIAG_IGNORE(x) NOOP +# define CLANG_DIAG_RESTORE_STMT CLANG_DIAG_RESTORE NOOP +#endif + #ifdef USE_ITHREADS /* Magic signature(s) for mg_private to make PERL_MAGIC_ext magic safer */ @@ -656,17 +665,10 @@ Perl_sharedsv_cond_timedwait(perl_cond *cond, perl_mutex *mut, double abs) abs -= (NV)ts.tv_sec; ts.tv_nsec = (long)(abs * 1000000000.0); -#if defined(CLANG_DIAG_IGNORE) - CLANG_DIAG_IGNORE(-Wthread-safety); + CLANG_DIAG_IGNORE_STMT(-Wthread-safety); /* warning: calling function 'pthread_cond_timedwait' requires holding mutex 'mut' exclusively [-Wthread-safety-analysis] */ -#endif - switch (pthread_cond_timedwait(cond, mut, &ts)) { - -/* perl.h defines CLANG_DIAG_* but only in 5.24+ */ -#if defined(CLANG_DIAG_RESTORE) -CLANG_DIAG_RESTORE; -#endif + CLANG_DIAG_RESTORE_STMT; case 0: got_it = 1; break; case ETIMEDOUT: break; diff --git a/dist/threads/lib/threads.pm b/dist/threads/lib/threads.pm index 816d12415c..2eb926a071 100644 --- a/dist/threads/lib/threads.pm +++ b/dist/threads/lib/threads.pm @@ -5,7 +5,7 @@ use 5.008; use strict; use warnings; -our $VERSION = '2.20'; # remember to update version in POD! +our $VERSION = '2.21'; # remember to update version in POD! my $XS_VERSION = $VERSION; $VERSION = eval $VERSION; @@ -134,7 +134,7 @@ threads - Perl interpreter-based threads =head1 VERSION -This document describes threads version 2.20 +This document describes threads version 2.21 =head1 WARNING diff --git a/dist/threads/threads.xs b/dist/threads/threads.xs index 49a700f2cd..4e9e31fdeb 100644 --- a/dist/threads/threads.xs +++ b/dist/threads/threads.xs @@ -35,6 +35,17 @@ # endif #endif +#ifndef CLANG_DIAG_IGNORE +# define CLANG_DIAG_IGNORE(x) +# define CLANG_DIAG_RESTORE +#endif +#ifndef CLANG_DIAG_IGNORE_STMT +# define CLANG_DIAG_IGNORE_STMT(x) CLANG_DIAG_IGNORE(x) NOOP +# define CLANG_DIAG_RESTORE_STMT CLANG_DIAG_RESTORE NOOP +# define CLANG_DIAG_IGNORE_DECL(x) CLANG_DIAG_IGNORE(x) dNOOP +# define CLANG_DIAG_RESTORE_DECL CLANG_DIAG_RESTORE dNOOP +#endif + #ifdef USE_ITHREADS #ifdef __amigaos4__ @@ -1019,15 +1030,10 @@ S_ithread_create( MUTEX_UNLOCK(&my_pool->create_destruct_mutex); return (thread); -#if defined(CLANG_DIAG_IGNORE) - CLANG_DIAG_IGNORE(-Wthread-safety); + CLANG_DIAG_IGNORE_STMT(-Wthread-safety); /* warning: mutex 'thread->mutex' is not held on every path through here [-Wthread-safety-analysis] */ -#endif } -/* perl.h defines CLANG_DIAG_* but only in 5.24+ */ -#if defined(CLANG_DIAG_RESTORE) -CLANG_DIAG_RESTORE -#endif +CLANG_DIAG_RESTORE_DECL; #endif /* USE_ITHREADS */ @@ -1165,10 +1171,10 @@ ithread_create(...) /* Let thread run. */ /* See S_ithread_run() for more detail. */ - CLANG_DIAG_IGNORE(-Wthread-safety); + CLANG_DIAG_IGNORE_STMT(-Wthread-safety); /* warning: releasing mutex 'thread->mutex' that was not held [-Wthread-safety-analysis] */ MUTEX_UNLOCK(&thread->mutex); - CLANG_DIAG_RESTORE; + CLANG_DIAG_RESTORE_STMT; /* XSRETURN(1); - implied */ @@ -629,9 +629,9 @@ S_openn_cleanup(pTHX_ GV *gv, IO *io, PerlIO *fp, char *mode, const char *oname, ) { - GCC_DIAG_IGNORE(-Wformat-nonliteral); /* PL_warn_nl is constant */ + GCC_DIAG_IGNORE_STMT(-Wformat-nonliteral); /* PL_warn_nl is constant */ Perl_warner(aTHX_ packWARN(WARN_NEWLINE), PL_warn_nl, "open"); - GCC_DIAG_RESTORE; + GCC_DIAG_RESTORE_STMT; } goto say_false; } @@ -1888,9 +1888,9 @@ Perl_my_stat_flags(pTHX_ const U32 flags) PL_laststatval = PerlLIO_stat(d, &PL_statcache); } if (PL_laststatval < 0 && ckWARN(WARN_NEWLINE) && should_warn_nl(s)) { - GCC_DIAG_IGNORE(-Wformat-nonliteral); /* PL_warn_nl is constant */ + GCC_DIAG_IGNORE_STMT(-Wformat-nonliteral); /* PL_warn_nl is constant */ Perl_warner(aTHX_ packWARN(WARN_NEWLINE), PL_warn_nl, "stat"); - GCC_DIAG_RESTORE; + GCC_DIAG_RESTORE_STMT; } return PL_laststatval; } @@ -1959,9 +1959,9 @@ Perl_my_lstat_flags(pTHX_ const U32 flags) PL_laststatval = PerlLIO_lstat(file,&PL_statcache); } if (PL_laststatval < 0 && ckWARN(WARN_NEWLINE) && should_warn_nl(file)) { - GCC_DIAG_IGNORE(-Wformat-nonliteral); /* PL_warn_nl is constant */ + GCC_DIAG_IGNORE_STMT(-Wformat-nonliteral); /* PL_warn_nl is constant */ Perl_warner(aTHX_ packWARN(WARN_NEWLINE), PL_warn_nl, "lstat"); - GCC_DIAG_RESTORE; + GCC_DIAG_RESTORE_STMT; } return PL_laststatval; } diff --git a/ext/POSIX/POSIX.xs b/ext/POSIX/POSIX.xs index 49d36a3fc0..a70ec21c93 100644 --- a/ext/POSIX/POSIX.xs +++ b/ext/POSIX/POSIX.xs @@ -3560,9 +3560,9 @@ strftime(fmt, sec, min, hour, mday, mon, year, wday = -1, yday = -1, isdst = -1) /* allowing user-supplied (rather than literal) formats * is normally frowned upon as a potential security risk; * but this is part of the API so we have to allow it */ - GCC_DIAG_IGNORE(-Wformat-nonliteral); + GCC_DIAG_IGNORE_STMT(-Wformat-nonliteral); buf = my_strftime(SvPV_nolen(fmt), sec, min, hour, mday, mon, year, wday, yday, isdst); - GCC_DIAG_RESTORE; + GCC_DIAG_RESTORE_STMT; sv = sv_newmortal(); if (buf) { STRLEN len = strlen(buf); @@ -244,17 +244,13 @@ S_sv_or_pv_pos_u2b(pTHX_ SV *sv, const char *pv, STRLEN pos, STRLEN *lenp) /* ------------------------------- handy.h ------------------------------- */ /* saves machine code for a common noreturn idiom typically used in Newx*() */ -#ifdef GCC_DIAG_PRAGMA -GCC_DIAG_IGNORE(-Wunused-function) /* Intentionally left semicolonless. */ -#endif +GCC_DIAG_IGNORE_DECL(-Wunused-function); static void S_croak_memory_wrap(void) { Perl_croak_nocontext("%s",PL_memory_wrap); } -#ifdef GCC_DIAG_PRAGMA -GCC_DIAG_RESTORE /* Intentionally left semicolonless. */ -#endif +GCC_DIAG_RESTORE_DECL; /* ------------------------------- utf8.h ------------------------------- */ @@ -1168,9 +1164,9 @@ Perl_utf8_hop(const U8 *s, SSize_t off) s--; } } - GCC_DIAG_IGNORE(-Wcast-qual); + GCC_DIAG_IGNORE_STMT(-Wcast-qual); return (U8 *)s; - GCC_DIAG_RESTORE; + GCC_DIAG_RESTORE_STMT; } /* @@ -1205,16 +1201,16 @@ Perl_utf8_hop_forward(const U8 *s, SSize_t off, const U8 *end) while (off--) { STRLEN skip = UTF8SKIP(s); if ((STRLEN)(end - s) <= skip) { - GCC_DIAG_IGNORE(-Wcast-qual); + GCC_DIAG_IGNORE_STMT(-Wcast-qual); return (U8 *)end; - GCC_DIAG_RESTORE; + GCC_DIAG_RESTORE_STMT; } s += skip; } - GCC_DIAG_IGNORE(-Wcast-qual); + GCC_DIAG_IGNORE_STMT(-Wcast-qual); return (U8 *)s; - GCC_DIAG_RESTORE; + GCC_DIAG_RESTORE_STMT; } /* @@ -1252,9 +1248,9 @@ Perl_utf8_hop_back(const U8 *s, SSize_t off, const U8 *start) s--; } - GCC_DIAG_IGNORE(-Wcast-qual); + GCC_DIAG_IGNORE_STMT(-Wcast-qual); return (U8 *)s; - GCC_DIAG_RESTORE; + GCC_DIAG_RESTORE_STMT; } /* @@ -640,11 +640,9 @@ Perl__warn_problematic_locale() * _CHECK_AND_WARN_PROBLEMATIC_LOCALE */ if (PL_warn_locale) { - /*GCC_DIAG_IGNORE(-Wformat-security); Didn't work */ Perl_ck_warner(aTHX_ packWARN(WARN_LOCALE), SvPVX(PL_warn_locale), 0 /* dummy to avoid compiler warning */ ); - /* GCC_DIAG_RESTORE; */ SvREFCNT_dec_NN(PL_warn_locale); PL_warn_locale = NULL; } @@ -391,26 +391,24 @@ /* on gcc (and clang), specify that a warning should be temporarily * ignored; e.g. * - * GCC_DIAG_IGNORE(-Wmultichar); + * GCC_DIAG_IGNORE_DECL(-Wmultichar); * char b = 'ab'; - * GCC_DIAG_RESTORE; + * GCC_DIAG_RESTORE_DECL; * * based on http://dbp-consulting.com/tutorials/SuppressingGCCWarnings.html * * Note that "pragma GCC diagnostic push/pop" was added in GCC 4.6, Mar 2011; * clang only pretends to be GCC 4.2, but still supports push/pop. * - * Note on usage: on non-gcc (or lookalike, like clang) compilers - * one cannot use these with a semicolon at file (global) level without - * warnings since they are defined as empty, which leads into the terminating - * semicolon being left alone on a line: - * ; - * which makes compilers mildly cranky. Therefore at file level one - * should use the GCC_DIAG_IGNORE and GCC_DIAG_RESTORE macros *without* - * the semicolons. + * Note on usage: all macros must be used at a place where a declaration + * or statement can occur, i.e., not in the middle of an expression. + * *_DIAG_IGNORE() and *_DIAG_RESTORE can be used in any such place, but + * must be used without a following semicolon. *_DIAG_IGNORE_DECL() and + * *_DIAG_RESTORE_DECL must be used with a following semicolon, and behave + * syntactically as declarations (like dNOOP). *_DIAG_IGNORE_STMT() + * and *_DIAG_RESTORE_STMT must be used with a following semicolon, + * and behave syntactically as statements (like NOOP). * - * (A dead-on-arrival solution would be to try to define the macros as - * NOOP or dNOOP, those don't work both inside functions and outside.) */ #if defined(__clang__) || defined(__clang) || \ @@ -424,6 +422,10 @@ # define GCC_DIAG_IGNORE(w) # define GCC_DIAG_RESTORE #endif +#define GCC_DIAG_IGNORE_DECL(x) GCC_DIAG_IGNORE(x) dNOOP +#define GCC_DIAG_RESTORE_DECL GCC_DIAG_RESTORE dNOOP +#define GCC_DIAG_IGNORE_STMT(x) GCC_DIAG_IGNORE(x) NOOP +#define GCC_DIAG_RESTORE_STMT GCC_DIAG_RESTORE NOOP /* for clang specific pragmas */ #if defined(__clang__) || defined(__clang) # define CLANG_DIAG_PRAGMA(x) _Pragma (#x) @@ -434,6 +436,10 @@ # define CLANG_DIAG_IGNORE(w) # define CLANG_DIAG_RESTORE #endif +#define CLANG_DIAG_IGNORE_DECL(x) CLANG_DIAG_IGNORE(x) dNOOP +#define CLANG_DIAG_RESTORE_DECL CLANG_DIAG_RESTORE dNOOP +#define CLANG_DIAG_IGNORE_STMT(x) CLANG_DIAG_IGNORE(x) NOOP +#define CLANG_DIAG_RESTORE_STMT CLANG_DIAG_RESTORE NOOP #define NOOP /*EMPTY*/(void)0 /* cea2e8a9dd23747f accidentally lost the comment originally from the first @@ -6553,7 +6559,7 @@ extern void moncontrol(int); */ /* The quadmath literals are anon structs which -Wc++-compat doesn't like. */ -GCC_DIAG_IGNORE(-Wc++-compat) +GCC_DIAG_IGNORE_DECL(-Wc++-compat); # ifdef USE_QUADMATH /* Cannot use HUGE_VALQ for PL_inf because not a compile-time @@ -6623,7 +6629,7 @@ INFNAN_NV_U8_DECL PL_nan = { 0.0/0.0 }; /* keep last */ # endif # endif -GCC_DIAG_RESTORE +GCC_DIAG_RESTORE_DECL; #else @@ -3584,9 +3584,9 @@ PerlIOStdio_set_ptrcnt(pTHX_ PerlIO *f, STDCHAR * ptr, SSize_t cnt) * - casting the LHS to (void*) -- totally unportable * * So let's try silencing the warning at least for gcc. */ - GCC_DIAG_IGNORE(-Wpointer-sign); + GCC_DIAG_IGNORE_STMT(-Wpointer-sign); PerlSIO_set_ptr(stdio, ptr); /* LHS STDCHAR* cast non-portable */ - GCC_DIAG_RESTORE; + GCC_DIAG_RESTORE_STMT; #ifdef STDIO_PTR_LVAL_SETS_CNT assert(PerlSIO_get_cnt(stdio) == (cnt)); #endif @@ -868,9 +868,9 @@ PP(pp_formline) } #else /* we generate fmt ourselves so it is safe */ - GCC_DIAG_IGNORE(-Wformat-nonliteral); + GCC_DIAG_IGNORE_STMT(-Wformat-nonliteral); len = my_snprintf(t, max, fmt, (int) fieldsize, (int) arg, value); - GCC_DIAG_RESTORE; + GCC_DIAG_RESTORE_STMT; #endif PERL_MY_SNPRINTF_POST_GUARD(len, max); RESTORE_LC_NUMERIC(); @@ -2981,9 +2981,9 @@ PP(pp_stat) if (PL_laststatval < 0) { if (ckWARN(WARN_NEWLINE) && should_warn_nl(file)) { /* PL_warn_nl is constant */ - GCC_DIAG_IGNORE(-Wformat-nonliteral); + GCC_DIAG_IGNORE_STMT(-Wformat-nonliteral); Perl_warner(aTHX_ packWARN(WARN_NEWLINE), PL_warn_nl, "stat"); - GCC_DIAG_RESTORE; + GCC_DIAG_RESTORE_STMT; } max = 0; } @@ -3014,11 +3014,11 @@ PP(pp_stat) */ bool neg; Stat_t s; - CLANG_DIAG_IGNORE(-Wtautological-compare); - GCC_DIAG_IGNORE(-Wtype-limits); + CLANG_DIAG_IGNORE_STMT(-Wtautological-compare); + GCC_DIAG_IGNORE_STMT(-Wtype-limits); neg = PL_statcache.st_ino < 0; - GCC_DIAG_RESTORE; - CLANG_DIAG_RESTORE; + GCC_DIAG_RESTORE_STMT; + CLANG_DIAG_RESTORE_STMT; if (neg) { s.st_ino = (IV)PL_statcache.st_ino; if (LIKELY(s.st_ino == PL_statcache.st_ino)) { @@ -3593,9 +3593,9 @@ PP(pp_fttext) } if (ckWARN(WARN_NEWLINE) && should_warn_nl(file)) { /* PL_warn_nl is constant */ - GCC_DIAG_IGNORE(-Wformat-nonliteral); + GCC_DIAG_IGNORE_STMT(-Wformat-nonliteral); Perl_warner(aTHX_ packWARN(WARN_NEWLINE), PL_warn_nl, "open"); - GCC_DIAG_RESTORE; + GCC_DIAG_RESTORE_STMT; } FT_RETURNUNDEF; } @@ -20337,9 +20337,9 @@ S_put_range(pTHX_ SV *sv, UV start, const UV end, const bool allow_literals) #else format = "\\x%02" UVXf "-\\x%02" UVXf; #endif - GCC_DIAG_IGNORE(-Wformat-nonliteral); + GCC_DIAG_IGNORE_STMT(-Wformat-nonliteral); Perl_sv_catpvf(aTHX_ sv, format, start, this_end); - GCC_DIAG_RESTORE; + GCC_DIAG_RESTORE_STMT; break; } } @@ -13080,7 +13080,7 @@ Perl_sv_vcatpvfn_flags(pTHX_ SV *const sv, const char *const pat, const STRLEN p /* hopefully the above makes ptr a very constrained format * that is safe to use, even though it's not literal */ - GCC_DIAG_IGNORE(-Wformat-nonliteral); + GCC_DIAG_IGNORE_STMT(-Wformat-nonliteral); #ifdef USE_QUADMATH { const char* qfmt = quadmath_format_single(ptr); @@ -13103,7 +13103,7 @@ Perl_sv_vcatpvfn_flags(pTHX_ SV *const sv, const char *const pat, const STRLEN p #else elen = my_snprintf(PL_efloatbuf, PL_efloatsize, ptr, fv); #endif - GCC_DIAG_RESTORE; + GCC_DIAG_RESTORE_STMT; } eptr = PL_efloatbuf; @@ -16893,7 +16893,7 @@ Perl_report_uninit(pTHX_ const SV *uninit_sv) desc = "sort"; /* PL_warn_uninit_sv is constant */ - GCC_DIAG_IGNORE(-Wformat-nonliteral); + GCC_DIAG_IGNORE_STMT(-Wformat-nonliteral); if (desc) /* diag_listed_as: Use of uninitialized value%s */ Perl_warner(aTHX_ packWARN(WARN_UNINITIALIZED), PL_warn_uninit_sv, @@ -16902,7 +16902,7 @@ Perl_report_uninit(pTHX_ const SV *uninit_sv) else Perl_warner(aTHX_ packWARN(WARN_UNINITIALIZED), PL_warn_uninit, "", "", ""); - GCC_DIAG_RESTORE; + GCC_DIAG_RESTORE_STMT; } /* @@ -62,14 +62,14 @@ Perl_taint_proper(pTHX_ const char *f, const char *const s) /* XXX because taint_proper adds extra format args, we can't * get the caller to check properly; o we just silence the warning * and hope the callers aren't naughty */ - GCC_DIAG_IGNORE(-Wformat-nonliteral); + GCC_DIAG_IGNORE_STMT(-Wformat-nonliteral); if (PL_unsafe || TAINT_WARN_get) { Perl_ck_warner_d(aTHX_ packWARN(WARN_TAINT), f, s, ug); } else { Perl_croak(aTHX_ f, s, ug); } - GCC_DIAG_RESTORE; + GCC_DIAG_RESTORE_STMT; } } @@ -456,9 +456,9 @@ S_printbuf(pTHX_ const char *const fmt, const char *const s) PERL_ARGS_ASSERT_PRINTBUF; - GCC_DIAG_IGNORE(-Wformat-nonliteral); /* fmt checked by caller */ + GCC_DIAG_IGNORE_STMT(-Wformat-nonliteral); /* fmt checked by caller */ PerlIO_printf(Perl_debug_log, fmt, pv_display(tmp, s, strlen(s), 0, 60)); - GCC_DIAG_RESTORE; + GCC_DIAG_RESTORE_STMT; SvREFCNT_dec(tmp); } @@ -7611,10 +7611,10 @@ Perl_yylex(pTHX) if (!*d && !gv_stashpv(PL_tokenbuf, UTF ? SVf_UTF8 : 0)) { /* PL_warn_reserved is constant */ - GCC_DIAG_IGNORE(-Wformat-nonliteral); + GCC_DIAG_IGNORE_STMT(-Wformat-nonliteral); Perl_warner(aTHX_ packWARN(WARN_RESERVED), PL_warn_reserved, PL_tokenbuf); - GCC_DIAG_RESTORE; + GCC_DIAG_RESTORE_STMT; } } } @@ -8967,13 +8967,13 @@ S_pending_ident(pTHX) if (has_colon) { /* "my" variable %s can't be in a package */ /* PL_no_myglob is constant */ - GCC_DIAG_IGNORE(-Wformat-nonliteral); + GCC_DIAG_IGNORE_STMT(-Wformat-nonliteral); yyerror_pv(Perl_form(aTHX_ PL_no_myglob, PL_in_my == KEY_my ? "my" : "state", *PL_tokenbuf == '&' ? "subroutin" : "variabl", PL_tokenbuf), UTF ? SVf_UTF8 : 0); - GCC_DIAG_RESTORE; + GCC_DIAG_RESTORE_STMT; } if (PL_in_my == KEY_sigvar) { @@ -3791,9 +3791,9 @@ Perl_my_strftime(pTHX_ const char *fmt, int sec, int min, int hour, int mday, in buflen = 64; Newx(buf, buflen, char); - GCC_DIAG_IGNORE(-Wformat-nonliteral); /* fmt checked by caller */ + GCC_DIAG_IGNORE_STMT(-Wformat-nonliteral); /* fmt checked by caller */ len = strftime(buf, buflen, fmt, &mytm); - GCC_DIAG_RESTORE; + GCC_DIAG_RESTORE_STMT; /* ** The following is needed to handle to the situation where @@ -3819,9 +3819,9 @@ Perl_my_strftime(pTHX_ const char *fmt, int sec, int min, int hour, int mday, in Renew(buf, bufsize, char); while (buf) { - GCC_DIAG_IGNORE(-Wformat-nonliteral); /* fmt checked by caller */ + GCC_DIAG_IGNORE_STMT(-Wformat-nonliteral); /* fmt checked by caller */ buflen = strftime(buf, bufsize, fmt, &mytm); - GCC_DIAG_RESTORE; + GCC_DIAG_RESTORE_STMT; if (buflen > 0 && buflen < bufsize) break; |