diff options
author | Robin Houston <robin@cpan.org> | 2001-04-02 16:03:29 +0100 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-04-03 13:11:46 +0000 |
commit | 936edb8bce14c9708bc6198559047de5d7e6af47 (patch) | |
tree | 56418e45ab38e385bc4cd7ab1edf78f3c4007654 /op.c | |
parent | 31f187ae5b4b937f1c4319a89e6fd6f99121320a (diff) | |
download | perl-936edb8bce14c9708bc6198559047de5d7e6af47.tar.gz |
Re: [ID 20010331.003] new misc warning for push(@x), unshift(@x)
Message-ID: <20010402150329.A6636@puffinry.freeserve.co.uk>
p4raw-id: //depot/perl@9532
Diffstat (limited to 'op.c')
-rw-r--r-- | op.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -5679,6 +5679,12 @@ Perl_ck_fun(pTHX_ OP *o) list(kid); break; case OA_AVREF: + if ((type == OP_PUSH || type == OP_UNSHIFT) + && !kid->op_sibling && ckWARN(WARN_MISC)) + Perl_warner(aTHX_ WARN_MISC, + "Useless use of %s with no arguments", + PL_op_desc[type]); + if (kid->op_type == OP_CONST && (kid->op_private & OPpCONST_BARE)) { |