X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=op.c;h=7d28e36dd03ca6de76376fa71426975a1bb010fb;hb=07766739ad671051f274806a83c05be36e7ca89a;hp=6cd2f9ab9c2328bd8a2b11e722315a23698dfaf4;hpb=445266f0938267c411534829fc317a7638dc4908;p=p5sagit%2Fp5-mst-13.2.git diff --git a/op.c b/op.c index 6cd2f9a..7d28e36 100644 --- a/op.c +++ b/op.c @@ -1137,6 +1137,9 @@ Perl_scalarvoid(pTHX_ OP *o) else { if (ckWARN(WARN_VOID)) { useless = "a constant"; + /* the constants 0 and 1 are permitted as they are + conventionally used as dummies in constructs like + 1 while some_condition_with_side_effects; */ if (SvNIOK(sv) && (SvNV(sv) == 0.0 || SvNV(sv) == 1.0)) useless = 0; else if (SvPOK(sv)) { @@ -3616,7 +3619,7 @@ Perl_newSTATEOP(pTHX_ I32 flags, char *label, OP *o) cop->op_ppaddr = PL_ppaddr[ OP_NEXTSTATE ]; } cop->op_flags = flags; - cop->op_private = (PL_hints & HINT_BYTE); + cop->op_private = (PL_hints & HINT_PRIVATE_MASK); #ifdef NATIVE_HINTS cop->op_private |= NATIVE_HINTS; #endif