summaryrefslogtreecommitdiff
path: root/pp_ctl.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 /pp_ctl.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 'pp_ctl.c')
-rw-r--r--pp_ctl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/pp_ctl.c b/pp_ctl.c
index 9ff2abecd3..bde8d298de 100644
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -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();