summaryrefslogtreecommitdiff
path: root/op.c
diff options
context:
space:
mode:
authorLukas Mai <l.mai@web.de>2016-10-22 17:48:03 +0200
committerLukas Mai <l.mai@web.de>2016-10-22 17:48:03 +0200
commit9af62dcbf8dcfc51b4a96307e945369b28e0c215 (patch)
tree917cc84f2c375ccb527c7ff5e077e54361d96b89 /op.c
parent01b515d1d793fe9ee31ac67de850d943ce109686 (diff)
downloadperl-9af62dcbf8dcfc51b4a96307e945369b28e0c215.tar.gz
op.c: silence compiler warning in fold_constants()
op.c: In function ‘S_fold_constants’: op.c:4374:28: warning: argument ‘o’ might be clobbered by ‘longjmp’ or ‘vfork’ [-Wclobbered] S_fold_constants(pTHX_ OP *o) ^ This warning occurs for non-volatile local variables where the compiler can't prove that their value doesn't change between setjmp and longjmp (because the modified value may only be stored in a register which longjmp overwrites). Adding 'const' apparently convinces the compiler that no such modification occurs.
Diffstat (limited to 'op.c')
-rw-r--r--op.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/op.c b/op.c
index ebbbf81a5a..cf1399ebbe 100644
--- a/op.c
+++ b/op.c
@@ -4371,7 +4371,7 @@ S_op_integerize(pTHX_ OP *o)
}
static OP *
-S_fold_constants(pTHX_ OP *o)
+S_fold_constants(pTHX_ OP *const o)
{
dVAR;
OP * VOL curop;