summaryrefslogtreecommitdiff
path: root/sv.c
diff options
context:
space:
mode:
authorZefram <zefram@fysh.org>2017-12-16 07:12:48 +0000
committerZefram <zefram@fysh.org>2017-12-16 07:12:48 +0000
commit7347ee5481c77d2fdb023e0a1c19943d039ecc86 (patch)
tree33070b53fbf3d2c5c3408c580e3026b9b4e9e1d5 /sv.c
parent64def2aeaeb63f92dadc6dfa33486c1d7b311963 (diff)
downloadperl-7347ee5481c77d2fdb023e0a1c19943d039ecc86.tar.gz
semicolon-friendly diagnostic control
New macros {GCC,CLANG}_DIAG_{IGNORE,RESTORE}_{DECL,STMT}, which take a following semicolon. It is necessary to use the _DECL or _STMT version as appropriate to the context. Fixes [perl #130726].
Diffstat (limited to 'sv.c')
-rw-r--r--sv.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sv.c b/sv.c
index 4f45992423..0daae03b22 100644
--- a/sv.c
+++ b/sv.c
@@ -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;
}
/*