summaryrefslogtreecommitdiff
path: root/perlio.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 /perlio.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 'perlio.c')
-rw-r--r--perlio.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/perlio.c b/perlio.c
index e7dd7f5f18..2a57772c46 100644
--- a/perlio.c
+++ b/perlio.c
@@ -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