This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Remove OPpCONST_WARNING
authorFather Chrysostomos <sprout@cpan.org>
Tue, 1 May 2012 00:46:48 +0000 (17:46 -0700)
committerFather Chrysostomos <sprout@cpan.org>
Tue, 22 May 2012 04:38:16 +0000 (21:38 -0700)
This was added to op.h in commit 599cee73:

commit 599cee73f2261c5e09cde7ceba3f9a896989e117
Author: Paul Marquess <paul.marquess@btinternet.com>
Date:   Wed Jul 29 10:28:45 1998 +0100

    lexical warnings; tweaks to places that didn't apply correctly
     Message-Id: <9807290828.AA26286@claudius.bfsec.bt.co.uk>
     Subject: lexical warnings patch for 5.005_50

    p4raw-id: //depot/perl@1773

dump.c was modified to dump in, in this commit:

commit bf91b999b25fa75a3ef7a327742929592a2e7e9c
Author: Simon Cozens <simon@netthink.co.uk>
Date:   Sun May 13 21:20:36 2001 +0100

    Op private flags
    Message-ID: <20010513202036.A21896@netthink.co.uk>

    p4raw-id: //depot/perl@10117

But is apparently completely unused anywhere.  And I want that bit.

dump.c
op.h

diff --git a/dump.c b/dump.c
index b238ee0..9f3fb3b 100644 (file)
--- a/dump.c
+++ b/dump.c
@@ -733,8 +733,7 @@ const struct flag_to_name op_const_names[] = {
     {OPpCONST_SHORTCIRCUIT, ",SHORTCIRCUIT"},
     {OPpCONST_STRICT, ",STRICT"},
     {OPpCONST_ENTERED, ",ENTERED"},
-    {OPpCONST_BARE, ",BARE"},
-    {OPpCONST_WARNING, ",WARNING"}
+    {OPpCONST_BARE, ",BARE"}
 };
 
 const struct flag_to_name op_sort_names[] = {
@@ -2908,8 +2907,6 @@ Perl_do_op_xmldump(pTHX_ I32 level, PerlIO *file, const OP *o)
                sv_catpv(tmpsv, ",BARE");
            if (o->op_private & OPpCONST_STRICT)
                sv_catpv(tmpsv, ",STRICT");
-           if (o->op_private & OPpCONST_WARNING)
-               sv_catpv(tmpsv, ",WARNING");
            if (o->op_private & OPpCONST_ENTERED)
                sv_catpv(tmpsv, ",ENTERED");
        }
diff --git a/op.h b/op.h
index e50bd64..b6bbd4c 100644 (file)
--- a/op.h
+++ b/op.h
@@ -254,7 +254,6 @@ Deprecated.  Use C<GIMME_V> instead.
 #define        OPpCONST_STRICT         8       /* bareword subject to strict 'subs' */
 #define OPpCONST_ENTERED       16      /* Has been entered as symbol. */
 #define OPpCONST_BARE          64      /* Was a bare word (filehandle?). */
-#define OPpCONST_WARNING       128     /* Was a $^W translated to constant. */
 
 /* Private for OP_FLIP/FLOP */
 #define OPpFLIP_LINENUM                64      /* Range arg potentially a line num. */