Add a commented out warning and a way for diag.t to ignore it
authorYves Orton <demerphq@gmail.com>
Sun, 24 Mar 2013 10:47:22 +0000 (11:47 +0100)
committerYves Orton <demerphq@gmail.com>
Sun, 24 Mar 2013 10:50:18 +0000 (11:50 +0100)
hv.c
t/porting/diag.t

index 1a4558f..7d69fe4 100644 (file)
--- a/hv.c
+++ b/hv.c
@@ -802,6 +802,15 @@ Perl_hv_common(pTHX_ HV *hv, SV *keysv, const char *key, STRLEN klen,
     }
     PL_hash_rand_bits= ROTL_UV(PL_hash_rand_bits,1);
     if (SvOOK(hv)) {
+        /* Currently this makes various tests warn in annoying ways.
+         * So Silenced for now. - Yves | bogus end of comment =>* /
+        if (HvAUX(hv)->xhv_riter != -1) {
+            Perl_ck_warner_d(aTHX_ packWARN(WARN_INTERNAL),
+                             "[TESTING] Inserting into a hash during each() traversal results in undefined behavior"
+                             pTHX__FORMAT
+                             pTHX__VALUE);
+        }
+        */
         HvAUX(hv)->xhv_rand= (U32)PL_hash_rand_bits;
     }
 
index 2473e65..bcf853e 100644 (file)
@@ -359,6 +359,8 @@ sub check_file {
     # inside an #if 0 block.
     next if $name eq 'SKIPME';
 
+    next if $name=~/\[TESTING\]/; # ignore these as they are works in progress
+
     check_message(standardize($name),$codefn,$severity,$categories);
   }
 }