From: Yitzchak Scott-Thoennes Date: Sun, 9 May 2004 00:59:19 +0000 (-0700) Subject: void context !~ generates "Useless use of not at line..." warning X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=9f82cd5f7f8bdb6e571252f463f58a5e63b9a23d;p=p5sagit%2Fp5-mst-13.2.git void context !~ generates "Useless use of not at line..." warning Message-ID: <20040509075919.GA3752@efn.org> p4raw-id: //depot/perl@22807 --- diff --git a/op.c b/op.c index b3b5c44..bdc3426 100644 --- a/op.c +++ b/op.c @@ -661,6 +661,15 @@ Perl_scalarvoid(pTHX_ OP *o) useless = OP_DESC(o); break; + case OP_NOT: + kid = cUNOPo->op_first; + if (kid->op_type != OP_MATCH && kid->op_type != OP_SUBST && + kid->op_type != OP_TRANS) { + goto func_ops; + } + useless = "negative pattern binding (!~)"; + break; + case OP_RV2GV: case OP_RV2SV: case OP_RV2AV: